diff --git a/.gitignore b/.gitignore index d7be83925a..3773253cff 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,7 @@ stamp-h* config.h 3rdParty/libev/libtool out +3rdParty/libev/ARCH.x64 +.v8-build +.libev-build +Doxygen/js diff --git a/3rdParty/boost_1_48_0/include/boost/exception/detail/error_info_impl.hpp b/3rdParty/boost_1_48_0/include/boost/exception/detail/error_info_impl.hpp index 883d313a98..f432aabbf6 100644 --- a/3rdParty/boost_1_48_0/include/boost/exception/detail/error_info_impl.hpp +++ b/3rdParty/boost_1_48_0/include/boost/exception/detail/error_info_impl.hpp @@ -30,7 +30,7 @@ boost protected: - ~error_info_base() throw() + virtual ~error_info_base() throw() { } }; diff --git a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp index 53306dabf9..6abb033688 100644 --- a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp +++ b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif diff --git a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp index 8f9b94a5cd..e1cd851940 100644 --- a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp +++ b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif diff --git a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp index ec01d4b7fd..234936c587 100644 --- a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp +++ b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif diff --git a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp index 02fd8f7fe8..5898c6b978 100644 --- a/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp +++ b/3rdParty/boost_1_48_0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif diff --git a/ApplicationServer/ApplicationServerSchedulerImpl.cpp b/ApplicationServer/ApplicationServerSchedulerImpl.cpp index 43a626fcdc..a7e0f6eb3d 100644 --- a/ApplicationServer/ApplicationServerSchedulerImpl.cpp +++ b/ApplicationServer/ApplicationServerSchedulerImpl.cpp @@ -47,7 +47,7 @@ namespace { /// @brief handles control-c //////////////////////////////////////////////////////////////////////////////// - class ControlCTask : public rest::SignalTask { + class ControlCTask : public SignalTask { public: ControlCTask (ApplicationServer* server) : Task("Control-C"), SignalTask(), server(server) { diff --git a/Basics/Common.h b/Basics/Common.h index dfb24b7009..6c862c92e3 100644 --- a/Basics/Common.h +++ b/Basics/Common.h @@ -35,20 +35,6 @@ /// @{ //////////////////////////////////////////////////////////////////////////////// -// ----------------------------------------------------------------------------- -// --SECTIONS-- triagens namespace -// ----------------------------------------------------------------------------- - -namespace triagens { - using namespace std; - - typedef TRI_blob_t blob_t; - typedef TRI_datetime_t datetime_t; - typedef TRI_date_t date_t; - typedef TRI_seconds_t seconds_t; - typedef TRI_msec_t msec_t; -} - // ----------------------------------------------------------------------------- // --SECTION-- C++ header files that are always present on all systems // ----------------------------------------------------------------------------- @@ -65,6 +51,20 @@ namespace triagens { #include #include +// ----------------------------------------------------------------------------- +// --SECTIONS-- triagens namespace +// ----------------------------------------------------------------------------- + +namespace triagens { + using namespace std; + + typedef TRI_blob_t blob_t; + typedef TRI_datetime_t datetime_t; + typedef TRI_date_t date_t; + typedef TRI_seconds_t seconds_t; + typedef TRI_msec_t msec_t; +} + // ----------------------------------------------------------------------------- // --SECTION-- noncopyable class // ----------------------------------------------------------------------------- diff --git a/BasicsC/associative-multi.c b/BasicsC/associative-multi.c index 4898ec94e1..9ec6ca71c2 100644 --- a/BasicsC/associative-multi.c +++ b/BasicsC/associative-multi.c @@ -28,6 +28,575 @@ #include "associative-multi.h" + +// ----------------------------------------------------------------------------- +// --SECTION-- ASSOCIATIVE ARRAY +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds a new element +//////////////////////////////////////////////////////////////////////////////// + +static void AddNewElement(TRI_multi_array_t* array, void* element) { + uint64_t hash; + uint64_t i; + + + // ........................................................................... + // compute the hash + // ........................................................................... + + hash = array->hashElement(array, element); + + + // ........................................................................... + // search the table + // ........................................................................... + + i = hash % array->_nrAlloc; + while (! array->isEmptyElement(array, array->_table + i * array->_elementSize)) { + i = (i + 1) % array->_nrAlloc; + array->_nrProbesR++; + } + + + // ........................................................................... + // add a new element to the associative array + // ........................................................................... + + memcpy(array->_table + i * array->_elementSize, element, array->_elementSize); + array->_nrUsed++; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief resizes the array +//////////////////////////////////////////////////////////////////////////////// + +static void ResizeMultiArray (TRI_multi_array_t* array) { + char* oldTable; + uint64_t oldAlloc; + uint64_t j; + + oldTable = array->_table; + oldAlloc = array->_nrAlloc; + + array->_nrAlloc = 2 * array->_nrAlloc + 1; + array->_nrUsed = 0; + array->_nrResizes++; + + array->_table = TRI_Allocate(array->_nrAlloc * array->_elementSize); + + for (j = 0; j < array->_nrAlloc; j++) { + array->clearElement(array, array->_table + j * array->_elementSize); + } + + for (j = 0; j < oldAlloc; j++) { + if (! array->isEmptyElement(array, oldTable + j * array->_elementSize)) { + AddNewElement(array, oldTable + j * array->_elementSize); + } + } + + TRI_Free(oldTable); +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialises an array +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitMultiArray(TRI_multi_array_t* array, + size_t elementSize, + uint64_t (*hashKey) (TRI_multi_array_t*, void*), + uint64_t (*hashElement) (TRI_multi_array_t*, void*), + void (*clearElement) (TRI_multi_array_t*, void*), + bool (*isEmptyElement) (TRI_multi_array_t*, void*), + bool (*isEqualKeyElement) (TRI_multi_array_t*, void*, void*), + bool (*isEqualElementElement) (TRI_multi_array_t*, void*, void*)) { + char* p; + char* e; + + array->hashKey = hashKey; + array->hashElement = hashElement; + array->clearElement = clearElement; + array->isEmptyElement = isEmptyElement; + array->isEqualKeyElement = isEqualKeyElement; + array->isEqualElementElement = isEqualElementElement; + + array->_elementSize = elementSize; + array->_nrAlloc = 10; + + array->_table = TRI_Allocate(array->_elementSize * array->_nrAlloc); + + p = array->_table; + e = p + array->_elementSize * array->_nrAlloc; + + for (; p < e; p += array->_elementSize) { + array->clearElement(array, p); + } + + array->_nrUsed = 0; + array->_nrFinds = 0; + array->_nrAdds = 0; + array->_nrRems = 0; + array->_nrResizes = 0; + array->_nrProbesF = 0; + array->_nrProbesA = 0; + array->_nrProbesD = 0; + array->_nrProbesR = 0; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys an array, but does not free the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_DestroyMultiArray (TRI_multi_array_t* array) { + TRI_Free(array->_table); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys an array and frees the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeMultiArray (TRI_multi_array_t* array) { + TRI_DestroyMultiArray(array); + TRI_Free(array); +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given a key +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t TRI_LookupByKeyMultiArray (TRI_multi_array_t* array, void* key) { + TRI_vector_pointer_t result; + uint64_t hash; + uint64_t i; + + + // ........................................................................... + // initialise the vector which will hold the result if any + // ........................................................................... + + TRI_InitVectorPointer(&result); + + + // ........................................................................... + // compute the hash + // ........................................................................... + + hash = array->hashKey(array, key); + i = hash % array->_nrAlloc; + + + // ........................................................................... + // update statistics + // ........................................................................... + + array->_nrFinds++; + + + // ........................................................................... + // search the table + // ........................................................................... + + while (! array->isEmptyElement(array, array->_table + i * array->_elementSize)) { + + if (array->isEqualKeyElement(array, key, array->_table + i * array->_elementSize)) { + TRI_PushBackVectorPointer(&result, array->_table + i * array->_elementSize); + } + else { + array->_nrProbesF++; + } + + i = (i + 1) % array->_nrAlloc; + } + + // ........................................................................... + // return whatever we found -- which could be an empty vector list if nothing + // matches. + // ........................................................................... + return result; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given an element +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t TRI_LookupByElementMultiArray (TRI_multi_array_t* array, void* element) { + TRI_vector_pointer_t result; + uint64_t hash; + uint64_t i; + + + // ........................................................................... + // initialise the vector which will hold the result if any + // ........................................................................... + + TRI_InitVectorPointer(&result); + + + // ........................................................................... + // compute the hash + // ........................................................................... + + hash = array->hashElement(array, element); + i = hash % array->_nrAlloc; + + + // ........................................................................... + // update statistics + // ........................................................................... + + array->_nrFinds++; + + + // ........................................................................... + // search the table + // ........................................................................... + + while (! array->isEmptyElement(array, array->_table + i * array->_elementSize)) { + + if (array->isEqualElementElement(array, element, array->_table + i * array->_elementSize)) { + TRI_PushBackVectorPointer(&result, array->_table + i * array->_elementSize); + } + else { + array->_nrProbesF++; + } + + i = (i + 1) % array->_nrAlloc; + } + + // ........................................................................... + // return whatever we found -- which could be an empty vector list if nothing + // matches. Note that we allow multiple elements (compare with pointer impl). + // ........................................................................... + return result; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an element to the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertElementMultiArray (TRI_multi_array_t* array, void* element, bool overwrite) { + + uint64_t hash; + uint64_t i; + + + // ........................................................................... + // compute the hash + // ........................................................................... + + hash = array->hashElement(array, element); + i = hash % array->_nrAlloc; + + + // ........................................................................... + // update statistics + // ........................................................................... + + array->_nrAdds++; + + + + // ........................................................................... + // search the table + // ........................................................................... + + while (! array->isEmptyElement(array, array->_table + i * array->_elementSize) + && ! array->isEqualElementElement(array, element, array->_table + i * array->_elementSize)) { + i = (i + 1) % array->_nrAlloc; + array->_nrProbesA++; + } + + // ........................................................................... + // If we found an element, return. While we allow duplicate entries in the hash + // table, we do not allow duplicate elements. Elements would refer to the + // (for example) an actual row in memory. This is different from the + // TRI_InsertElementMultiArray function below where we only have keys to + // differentiate between elements. + // ........................................................................... + if (! array->isEmptyElement(array, array->_table + i * array->_elementSize)) { + if (overwrite) { + memcpy(array->_table + i * array->_elementSize, element, array->_elementSize); + } + + return false; + } + + + // ........................................................................... + // add a new element to the associative array + // ........................................................................... + + memcpy(array->_table + i * array->_elementSize, element, array->_elementSize); + array->_nrUsed++; + + + // ........................................................................... + // if we were adding and the table is more than half full, extend it + // ........................................................................... + + if (array->_nrAlloc < 2 * array->_nrUsed) { + ResizeMultiArray(array); + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an key/element to the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertKeyMultiArray (TRI_multi_array_t* array, void* key, void* element, bool overwrite) { + uint64_t hash; + uint64_t i; + + + // ........................................................................... + // compute the hash + // ........................................................................... + + hash = array->hashKey(array, key); + i = hash % array->_nrAlloc; + + + // ........................................................................... + // update statistics + // ........................................................................... + + array->_nrAdds++; + + + // ........................................................................... + // search the table + // ........................................................................... + + while (! array->isEmptyElement(array, array->_table + i * array->_elementSize)) { + i = (i + 1) % array->_nrAlloc; + array->_nrProbesA++; + } + + // ........................................................................... + // We do not look for an element (as opposed to the function above). So whether + // or not there exists a duplicate we do not care. + // ........................................................................... + + + // ........................................................................... + // add a new element to the associative array + // ........................................................................... + + memcpy(array->_table + i * array->_elementSize, element, array->_elementSize); + array->_nrUsed++; + + + // ........................................................................... + // if we were adding and the table is more than half full, extend it + // ........................................................................... + + if (array->_nrAlloc < 2 * array->_nrUsed) { + ResizeMultiArray(array); + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an element from the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveElementMultiArray (TRI_multi_array_t* array, void* element, void* old) { + uint64_t hash; + uint64_t i; + uint64_t k; + + + // ........................................................................... + // Obtain the hash + // ........................................................................... + hash = array->hashElement(array, element); + i = hash % array->_nrAlloc; + + + // ........................................................................... + // update statistics + // ........................................................................... + array->_nrRems++; + + + // ........................................................................... + // search the table + // ........................................................................... + while (! array->isEmptyElement(array, array->_table + i * array->_elementSize) + && ! array->isEqualElementElement(array, element, array->_table + i * array->_elementSize)) { + i = (i + 1) % array->_nrAlloc; + array->_nrProbesD++; + } + + + // ........................................................................... + // if we did not find such an item return false + // ........................................................................... + if (array->isEmptyElement(array, array->_table + i * array->_elementSize)) { + if (old != NULL) { + memset(old, 0, array->_elementSize); + } + + return false; + } + + + // ........................................................................... + // remove item + // ........................................................................... + if (old != NULL) { + memcpy(old, array->_table + i * array->_elementSize, array->_elementSize); + } + + + array->clearElement(array, array->_table + i * array->_elementSize); + array->_nrUsed--; + + + // ........................................................................... + // and now check the following places for items to move here + // ........................................................................... + k = (i + 1) % array->_nrAlloc; + + while (! array->isEmptyElement(array, array->_table + k * array->_elementSize)) { + uint64_t j = array->hashElement(array, array->_table + k * array->_elementSize) % array->_nrAlloc; + + if ((i < k && !(i < j && j <= k)) || (k < i && !(i < j || j <= k))) { + memcpy(array->_table + i * array->_elementSize, array->_table + k * array->_elementSize, array->_elementSize); + array->clearElement(array, array->_table + k * array->_elementSize); + i = k; + } + + k = (k + 1) % array->_nrAlloc; + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an key/element to the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveKeyMultiArray (TRI_multi_array_t* array, void* key, void* old) { + uint64_t hash; + uint64_t i; + uint64_t k; + + + // ........................................................................... + // generate hash using key + // ........................................................................... + hash = array->hashKey(array, key); + i = hash % array->_nrAlloc; + + + // ........................................................................... + // update statistics + // ........................................................................... + array->_nrRems++; + + + // ........................................................................... + // search the table -- we can only match keys + // ........................................................................... + while (! array->isEmptyElement(array, array->_table + i * array->_elementSize) + && ! array->isEqualKeyElement(array, key, array->_table + i * array->_elementSize)) { + i = (i + 1) % array->_nrAlloc; + array->_nrProbesD++; + } + + // ........................................................................... + // if we did not find such an item return false + // ........................................................................... + if (array->isEmptyElement(array, array->_table + i * array->_elementSize)) { + if (old != NULL) { + memset(old, 0, array->_elementSize); + } + + return false; + } + + + // ........................................................................... + // remove item + // ........................................................................... + if (old != NULL) { + memcpy(old, array->_table + i * array->_elementSize, array->_elementSize); + } + + array->clearElement(array, array->_table + i * array->_elementSize); + array->_nrUsed--; + + + // ........................................................................... + // and now check the following places for items to move here + // ........................................................................... + k = (i + 1) % array->_nrAlloc; + + while (! array->isEmptyElement(array, array->_table + k * array->_elementSize)) { + uint64_t j = array->hashElement(array, array->_table + k * array->_elementSize) % array->_nrAlloc; + + if ((i < k && !(i < j && j <= k)) || (k < i && !(i < j || j <= k))) { + memcpy(array->_table + i * array->_elementSize, array->_table + k * array->_elementSize, array->_elementSize); + array->clearElement(array, array->_table + k * array->_elementSize); + i = k; + } + + k = (k + 1) % array->_nrAlloc; + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + + // ----------------------------------------------------------------------------- // --SECTION-- ASSOCIATIVE POINTERS // ----------------------------------------------------------------------------- diff --git a/BasicsC/associative-multi.h b/BasicsC/associative-multi.h index 9b500f23bc..50df5178a5 100644 --- a/BasicsC/associative-multi.h +++ b/BasicsC/associative-multi.h @@ -47,6 +47,40 @@ extern "C" { /// @{ //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @brief associative multi array +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_multi_array_s { + uint64_t (*hashKey) (struct TRI_multi_array_s*, void*); + uint64_t (*hashElement) (struct TRI_multi_array_s*, void*); + + void (*clearElement) (struct TRI_multi_array_s*, void*); + + bool (*isEmptyElement) (struct TRI_multi_array_s*, void*); + bool (*isEqualKeyElement) (struct TRI_multi_array_s*, void*, void*); + bool (*isEqualElementElement) (struct TRI_multi_array_s*, void*, void*); + + uint32_t _elementSize; // the size of the elements which are to be stored in the table + + uint64_t _nrAlloc; // the size of the table + uint64_t _nrUsed; // the number of used entries + + + char* _table; // the table itself + + uint64_t _nrFinds; // statistics: number of lookup calls + uint64_t _nrAdds; // statistics: number of insert calls + uint64_t _nrRems; // statistics: number of remove calls + uint64_t _nrResizes; // statistics: number of resizes + + uint64_t _nrProbesF; // statistics: number of misses while looking up + uint64_t _nrProbesA; // statistics: number of misses while inserting + uint64_t _nrProbesD; // statistics: number of misses while removing + uint64_t _nrProbesR; // statistics: number of misses while adding +} +TRI_multi_array_t; + //////////////////////////////////////////////////////////////////////////////// /// @brief associative multi array of pointers //////////////////////////////////////////////////////////////////////////////// @@ -75,10 +109,105 @@ typedef struct TRI_multi_pointer_s { } TRI_multi_pointer_t; + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- +// --SECTION-- MULTI ASSOCIATIVE ARRAY +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialises an array +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitMultiArray (TRI_multi_array_t*, + size_t elementSize, + uint64_t (*hashKey) (TRI_multi_array_t*, void*), + uint64_t (*hashElement) (TRI_multi_array_t*, void*), + void (*clearElement) (TRI_multi_array_t*, void*), + bool (*isEmptyElement) (TRI_multi_array_t*, void*), + bool (*isEqualKeyElement) (TRI_multi_array_t*, void*, void*), + bool (*isEqualElementElement) (TRI_multi_array_t*, void*, void*)); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys an array, but does not free the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_DestroyMultiArray (TRI_multi_array_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys an array and frees the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeMultiArray (TRI_multi_array_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given a key +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t TRI_LookupByKeyMultiArray (TRI_multi_array_t*, void* key); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given an element +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t TRI_LookupByElementMultiArray (TRI_multi_array_t*, void* element); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an element to the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertElementMultiArray (TRI_multi_array_t*, void* element, bool overwrite); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an key/element to the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertKeyMultiArray (TRI_multi_array_t*, void* key, void* element, bool overwrite); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an element from the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveElementMultiArray (TRI_multi_array_t*, void* element, void* old); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an key/element to the array +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveKeyMultiArray (TRI_multi_array_t*, void* key, void* old); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + + + + // ----------------------------------------------------------------------------- // --SECTION-- MULTI ASSOCIATIVE POINTERS // ----------------------------------------------------------------------------- diff --git a/BasicsC/error.c b/BasicsC/error.c index 8453cd25ab..1557172347 100644 --- a/BasicsC/error.c +++ b/BasicsC/error.c @@ -35,6 +35,7 @@ #include "BasicsC/strings.h" #include "BasicsC/vector.h" +#include "BasicsC/associative.h" // ----------------------------------------------------------------------------- // --SECTION-- private types @@ -90,7 +91,7 @@ static pthread_key_t ErrorKey; /// @brief the error messages //////////////////////////////////////////////////////////////////////////////// -static TRI_vector_string_t ErrorMessages; +static TRI_associative_pointer_t ErrorMessages; //////////////////////////////////////////////////////////////////////////////// /// @} @@ -119,6 +120,39 @@ static void CleanupError (void* ptr) { #endif #endif +//////////////////////////////////////////////////////////////////////////////// +/// @brief Hash function used to hash error codes (no real hash, uses the error +/// code only) +//////////////////////////////////////////////////////////////////////////////// + +static uint64_t HashErrorCode (TRI_associative_pointer_t* array, + void const* key) { + return (uint64_t) *((int*) key); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Hash function used to hash errors messages (not used) +//////////////////////////////////////////////////////////////////////////////// + +static uint64_t HashError (TRI_associative_pointer_t* array, + void const* element) { + + TRI_error_t* entry = (TRI_error_t*) element; + return (uint64_t) entry->_code; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Comparison function used to determine error equality +//////////////////////////////////////////////////////////////////////////////// + +static bool EqualError (TRI_associative_pointer_t* array, + void const* key, + void const* element) { + TRI_error_t* entry = (TRI_error_t*) element; + + return *((int*) key) == entry->_code; +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -168,6 +202,7 @@ int TRI_errno () { char const* TRI_last_error () { int err; int sys; + TRI_error_t* entry; #if defined(TRI_GCC_THREAD_LOCAL_STORAGE) || defined(TRI_WIN32_THREAD_LOCAL_STORAGE) @@ -186,7 +221,7 @@ char const* TRI_last_error () { } else { err = eptr->_number; - err = eptr->_sys; + sys = eptr->_sys; } #else @@ -197,17 +232,12 @@ char const* TRI_last_error () { return strerror(sys); } - if (err < (int) ErrorMessages._length) { - char const* str = ErrorMessages._buffer[err]; - - if (str == NULL) { - return "general error"; - } - - return str; + entry = (TRI_error_t*) + TRI_LookupByKeyAssociativePointer(&ErrorMessages, (void const*) &err); + if (!entry) { + return "general error"; } - - return "general error"; + return entry->_message; } //////////////////////////////////////////////////////////////////////////////// @@ -229,6 +259,7 @@ int TRI_set_errno (int error) { #elif defined(TRI_HAVE_POSIX_THREADS) tri_error_t* eptr; + int copyErrno = errno; eptr = pthread_getspecific(ErrorKey); @@ -240,7 +271,7 @@ int TRI_set_errno (int error) { eptr->_number = error; if (error == TRI_ERROR_SYS_ERROR) { - eptr->_sys = errno; + eptr->_sys = copyErrno; } else { eptr->_sys = 0; @@ -258,11 +289,26 @@ int TRI_set_errno (int error) { //////////////////////////////////////////////////////////////////////////////// void TRI_set_errno_string (int error, char const* msg) { - if (error >= (int) ErrorMessages._length) { - TRI_ResizeVectorString(&ErrorMessages, error + 1); + TRI_error_t* entry; + + if (TRI_LookupByKeyAssociativePointer(&ErrorMessages, (void const*) &error)) { + // logic error, error number is redeclared + printf("Error: duplicate declaration of error code %i in %s:%i\n", + error, + __FILE__, + __LINE__); + exit(EXIT_FAILURE); } - ErrorMessages._buffer[error] = TRI_DuplicateString(msg); + entry = (TRI_error_t*) TRI_Allocate(sizeof(TRI_error_t)); + if (entry) { + entry->_code = error; + entry->_message = TRI_DuplicateString(msg); + TRI_InsertKeyAssociativePointer(&ErrorMessages, + &error, + entry, + false); + } } //////////////////////////////////////////////////////////////////////////////// @@ -291,7 +337,11 @@ void TRI_InitialiseError () { return; } - TRI_InitVectorString(&ErrorMessages); + TRI_InitAssociativePointer(&ErrorMessages, + HashErrorCode, + HashError, + EqualError, + 0); TRI_set_errno_string(0, "no error"); TRI_set_errno_string(1, "failed"); @@ -319,11 +369,23 @@ void TRI_InitialiseError () { //////////////////////////////////////////////////////////////////////////////// void TRI_ShutdownError () { + size_t i; + if (! Initialised) { return; } - TRI_DestroyVectorString(&ErrorMessages); + for (i = 0; i < ErrorMessages._nrAlloc; i++) { + TRI_error_t* entry = ErrorMessages._table[i]; + if (entry) { + if (entry->_message) { + TRI_Free(entry->_message); + } + TRI_Free(entry); + } + } + + TRI_DestroyAssociativePointer(&ErrorMessages); Initialised = false; } diff --git a/BasicsC/error.h b/BasicsC/error.h index 6908c2a76c..b0b46b6fc1 100644 --- a/BasicsC/error.h +++ b/BasicsC/error.h @@ -36,6 +36,29 @@ extern "C" { #endif +// ----------------------------------------------------------------------------- +// --SECTION-- public types +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup ErrorHandling +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief error code/message container +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_error_s { + int _code; + char* _message; +} +TRI_error_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + // ----------------------------------------------------------------------------- // --SECTION-- public constants // ----------------------------------------------------------------------------- diff --git a/BasicsC/files.c b/BasicsC/files.c index a0f06f67a1..9c00d277b2 100644 --- a/BasicsC/files.c +++ b/BasicsC/files.c @@ -354,10 +354,14 @@ TRI_vector_string_t TRI_FilesDirectory (char const* path) { struct _finddata_t fd; intptr_t handle; char* filter; - + TRI_InitVectorString(&result); filter = TRI_Concatenate2String(path, "\\*"); + if (!filter) { + return result; + } + handle = _findfirst(filter, &fd); TRI_FreeString(filter); diff --git a/BasicsC/fsrt.inc b/BasicsC/fsrt.inc index de51f036d7..d3db2a12fb 100644 --- a/BasicsC/fsrt.inc +++ b/BasicsC/fsrt.inc @@ -147,7 +147,7 @@ //////////////////////////////////////////////////////////////////////////////// #ifndef FSRT_INSTANCE -#define FSRT_INSTANCE +#define FSRT_INSTANCE Single #define FSRT_HAS_PREFIX 0 #else #define FSRT_HAS_PREFIX 1 diff --git a/BasicsC/hashes.c b/BasicsC/hashes.c index 90e675869e..05e078a046 100644 --- a/BasicsC/hashes.c +++ b/BasicsC/hashes.c @@ -94,6 +94,27 @@ uint64_t TRI_FnvHashString (char const* buffer) { return nHashVal; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief computes a FNV hash for strings with a length +//////////////////////////////////////////////////////////////////////////////// + +uint64_t TRI_FnvHashBlock (uint64_t hash, char const* buffer, size_t length) { + uint64_t nMagicPrime; + size_t j; + + nMagicPrime = 0x00000100000001b3ULL; + + for (j = 0; j < length; ++j) { + hash ^= buffer[j]; + hash *= nMagicPrime; + } + return hash; +} + +uint64_t TRI_FnvHashBlockInitial (void) { + return (0xcbf29ce484222325ULL); +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/BasicsC/hashes.h b/BasicsC/hashes.h index 1f1b70ffb4..7c5b274bc5 100644 --- a/BasicsC/hashes.h +++ b/BasicsC/hashes.h @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief hash functions +/// @brief hash functions /// /// @file /// @@ -35,7 +35,7 @@ extern "C" { #endif // ----------------------------------------------------------------------------- -// --SECTION-- FNV +// --SECTION-- (FNV-1a Fowler–Noll–Vo hash function) FNV // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- @@ -65,6 +65,13 @@ uint64_t TRI_FnvHashPointer (void const*, size_t); uint64_t TRI_FnvHashString (char const*); +//////////////////////////////////////////////////////////////////////////////// +/// @brief computes a FNV hash for blocks +//////////////////////////////////////////////////////////////////////////////// +uint64_t TRI_FnvHashBlock (uint64_t, char const*, size_t); +uint64_t TRI_FnvHashBlockInitial (void); + + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/BasicsC/json.c b/BasicsC/json.c index 0a0f3b2676..96596cbd1d 100644 --- a/BasicsC/json.c +++ b/BasicsC/json.c @@ -151,6 +151,11 @@ TRI_json_t* TRI_CreateNullJson () { TRI_json_t* result; result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_NULL; return result; @@ -164,6 +169,11 @@ TRI_json_t* TRI_CreateBooleanJson (bool value) { TRI_json_t* result; result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_BOOLEAN; result->_value._boolean = value; @@ -178,6 +188,11 @@ TRI_json_t* TRI_CreateNumberJson (double value) { TRI_json_t* result; result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_NUMBER; result->_value._number = value; @@ -204,6 +219,11 @@ TRI_json_t* TRI_CreateStringJson (char* value) { length = strlen(value); result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_STRING; result->_value._string.length = length + 1; result->_value._string.data = value; @@ -222,10 +242,20 @@ TRI_json_t* TRI_CreateStringCopyJson (char const* value) { length = strlen(value); result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_STRING; result->_value._string.length = length + 1; result->_value._string.data = TRI_DuplicateString2(value, length); + if (result->_value._string.data == NULL) { + TRI_Free(result); + return NULL; + } + return result; } @@ -237,6 +267,11 @@ TRI_json_t* TRI_CreateString2Json (char* value, size_t length) { TRI_json_t* result; result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_STRING; result->_value._string.length = length + 1; result->_value._string.data = value; @@ -252,10 +287,20 @@ TRI_json_t* TRI_CreateString2CopyJson (char const* value, size_t length) { TRI_json_t* result; result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_STRING; result->_value._string.length = length + 1; result->_value._string.data = TRI_DuplicateString2(value, length); + if (result->_value._string.data == NULL) { + TRI_Free(result); + return NULL; + } + return result; } @@ -267,6 +312,11 @@ TRI_json_t* TRI_CreateListJson () { TRI_json_t* result; result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_LIST; TRI_InitVector(&result->_value._objects, sizeof(TRI_json_t)); @@ -281,6 +331,11 @@ TRI_json_t* TRI_CreateArrayJson () { TRI_json_t* result; result = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (result == NULL) { + return NULL; + } + result->_type = TRI_JSON_ARRAY; TRI_InitVector(&result->_value._objects, sizeof(TRI_json_t)); @@ -321,12 +376,10 @@ void TRI_DestroyJson (TRI_json_t* object) { for (i = 0; i < n; ++i) { TRI_json_t* v = TRI_AtVector(&object->_value._objects, i); - TRI_DestroyJson(v); } TRI_DestroyVector(&object->_value._objects); - break; } } @@ -375,6 +428,8 @@ void TRI_PushBack2ListJson (TRI_json_t* list, TRI_json_t* object) { assert(list->_type == TRI_JSON_LIST); TRI_PushBackVector(&list->_value._objects, object); + + TRI_Free(object); } //////////////////////////////////////////////////////////////////////////////// @@ -393,6 +448,11 @@ void TRI_InsertArrayJson (TRI_json_t* object, char const* name, TRI_json_t* subo copy._value._string.length = length + 1; copy._value._string.data = TRI_DuplicateString2(name, length); // including '\0' + if (copy._value._string.data == NULL) { + // OOM + return; + } + TRI_PushBackVector(&object->_value._objects, ©); TRI_CopyToJson(©, subobject); @@ -415,8 +475,15 @@ void TRI_Insert2ArrayJson (TRI_json_t* object, char const* name, TRI_json_t* sub copy._value._string.length = length + 1; copy._value._string.data = TRI_DuplicateString2(name, length); // including '\0' + if (copy._value._string.data == NULL) { + // OOM + return; + } + TRI_PushBackVector(&object->_value._objects, ©); TRI_PushBackVector(&object->_value._objects, subobject); + + TRI_Free(subobject); } //////////////////////////////////////////////////////////////////////////////// @@ -508,6 +575,10 @@ bool TRI_SaveJson (char const* filename, TRI_json_t const* object) { tmp = TRI_Concatenate2String(filename, ".tmp"); + if (tmp == NULL) { + return false; + } + fd = TRI_CREATE(tmp, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); if (fd < 0) { @@ -624,6 +695,11 @@ TRI_json_t* TRI_CopyJson (TRI_json_t* src) { TRI_json_t* dst; dst = (TRI_json_t*) TRI_Allocate(sizeof(TRI_json_t)); + + if (dst == NULL) { + return NULL; + } + TRI_CopyToJson(dst, src); return dst; diff --git a/BasicsC/local-configuration.h.in b/BasicsC/local-configuration.h.in index 2b31ab81d6..10aa379c29 100644 --- a/BasicsC/local-configuration.h.in +++ b/BasicsC/local-configuration.h.in @@ -71,6 +71,12 @@ #undef TRI_ENABLE_TIMING +//////////////////////////////////////////////////////////////////////////////// +/// @brief memory allocation failures +//////////////////////////////////////////////////////////////////////////////// + +#undef TRI_ENABLE_MEMFAIL + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/BasicsC/memory.c b/BasicsC/memory.c index 01099f875a..bfa5e2a5cc 100644 --- a/BasicsC/memory.c +++ b/BasicsC/memory.c @@ -27,6 +27,35 @@ #include "BasicsC/common.h" +// ----------------------------------------------------------------------------- +// --SECTION-- private variables +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Memory +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Init flag for deliberate out-of-memory cases +//////////////////////////////////////////////////////////////////////////////// + +#ifdef TRI_ENABLE_MEMFAIL +static bool Initialised = false; +#endif + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Probability for deliberate out-of-memory cases +//////////////////////////////////////////////////////////////////////////////// + +#ifdef TRI_ENABLE_MEMFAIL +static double MemFailProbability; +#endif + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + // ----------------------------------------------------------------------------- // --SECTION-- public functions // ----------------------------------------------------------------------------- @@ -36,6 +65,29 @@ /// @{ //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @brief Enable deliberate out-of-memory cases for TRI_Allocate +//////////////////////////////////////////////////////////////////////////////// + +#ifdef TRI_ENABLE_MEMFAIL +void TRI_ActivateMemFailures (double probability) { + srand(32452843 + time(NULL) * 49979687); + MemFailProbability = probability; + Initialised = true; +} +#endif + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Deactivate deliberate out-of-memory cases for TRI_Allocate +//////////////////////////////////////////////////////////////////////////////// + +#ifdef TRI_ENABLE_MEMFAIL +void TRI_DeactiveMemFailures (void) { + Initialised = false; + MemFailProbability = 0.0; +} +#endif + //////////////////////////////////////////////////////////////////////////////// /// @brief basic memory management for allocate //////////////////////////////////////////////////////////////////////////////// @@ -43,12 +95,31 @@ void* TRI_Allocate (uint64_t n) { char* m; +#ifdef TRI_ENABLE_MEMFAIL + // if configured with --enable-memfail, we can make calls to malloc fail + // deliberately. This makes testing memory bottlenecks easier. + if (Initialised) { + if (RAND_MAX * MemFailProbability >= rand ()) { + errno = ENOMEM; + return NULL; + } + } +#endif + m = malloc((size_t) n); memset(m, 0, (size_t) n); return m; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief basic memory management for reallocate +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_Reallocate (void* m, uint64_t n) { + return realloc(m, n); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief basic memory management for deallocate //////////////////////////////////////////////////////////////////////////////// diff --git a/BasicsC/memory.h b/BasicsC/memory.h index 0381b04da8..ec4f64bb6c 100644 --- a/BasicsC/memory.h +++ b/BasicsC/memory.h @@ -45,12 +45,33 @@ extern "C" { /// @{ //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @brief out-of-memory simulator configuration functions for debugging +/// +/// Functions are only available if configured with --enable-memfail. +/// Otherwise, they are replaced with empty macros. +//////////////////////////////////////////////////////////////////////////////// + +#ifdef TRI_ENABLE_MEMFAIL +void TRI_ActivateMemFailures (double probability); +void TRI_DeactivateMemFailures (void); +#else +#define TRI_ActiveMemFailures(p) ; +#define TRI_DeactivateMemFailures() ; +#endif + //////////////////////////////////////////////////////////////////////////////// /// @brief basic memory management for allocate //////////////////////////////////////////////////////////////////////////////// void* TRI_Allocate (uint64_t); +//////////////////////////////////////////////////////////////////////////////// +/// @brief basic memory management for reallocate +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_Reallocate (void*, uint64_t); + //////////////////////////////////////////////////////////////////////////////// /// @brief basic memory management for deallocate //////////////////////////////////////////////////////////////////////////////// diff --git a/BasicsC/process-utils.c b/BasicsC/process-utils.c index 9240858ef3..c04121c48c 100644 --- a/BasicsC/process-utils.c +++ b/BasicsC/process-utils.c @@ -176,6 +176,15 @@ TRI_process_info_t TRI_ProcessInfo (TRI_pid_t pid) { return result; } +#else + +TRI_process_info_t TRI_ProcessInfo (TRI_pid_t pid) { + TRI_process_info_t result; + + memset(&result, 0, sizeof(result)); + return result; +} + #endif //////////////////////////////////////////////////////////////////////////////// diff --git a/Doxygen/Examples.AvocadoDB/rest1 b/Doxygen/Examples.AvocadoDB/rest1 index cbbee28257..13d295bd88 100644 --- a/Doxygen/Examples.AvocadoDB/rest1 +++ b/Doxygen/Examples.AvocadoDB/rest1 @@ -1,20 +1,10 @@ -> curl --data '@'- -X POST --dump - http://localhost:8529/_document/examples -{ "Hallo" : "World" } - -HTTP/1.1 201 Created -content-type: text/plain;charset=utf-8 -connection: Keep-Alive -server: triagens GmbH High-Performance HTTP Server -etag: "13658604" -location: /_document/9496015:13658604 -content-length: 0 - -> curl -X GET --dump - http://localhost:8529/_document/9496015:13658604 +> curl -X GET --dump - http://localhost:8529/collection/9496015/13658604 HTTP/1.1 200 OK content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -etag: "13658604" -content-length: 43 +etag: "13658605" -{"Hallo":"World","_id":"9496015:13658604"} +{ "Hallo" : "World", + "_id" : "9496015:13658604", + "_rev" : 13658605 } diff --git a/Doxygen/Examples.AvocadoDB/rest10 b/Doxygen/Examples.AvocadoDB/rest10 index 020a66c56f..30226a9ba6 100644 --- a/Doxygen/Examples.AvocadoDB/rest10 +++ b/Doxygen/Examples.AvocadoDB/rest10 @@ -1,23 +1,18 @@ -> curl -X GET --dump - http://localhost:8529/_document/9496015:13658604 -HTTP/1.1 200 OK -content-type: application/json -connection: Keep-Alive -server: triagens GmbH High-Performance HTTP Server -etag: "14252313" -content-length: 43 - -> curl --data @- -X PUT --header 'etag: "13865833"' --dump - http://localhost:8529/_document/9496015:13658604 +> curl --data @- -X PUT --header 'etag: "13865833"' +> --dump - http://localhost:8529/collection/9496015/13658604 { "Hallo" : "Me" } HTTP/1.1 409 Conflict content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 101 -{ "error" : true, "message" : "document /_document/9496015:13658604 is been altered", "code" : 409} +{ "error" : true, + "message" : "document /collection/9496015:13658604 has been altered", + "code" : 409} -> curl --data @- -X PUT --header 'etag: "13865833"' --dump - http://localhost:8529/_document/9496015:13658604?policy=last +> curl --data @- -X PUT --header 'etag: "13865833"' +> --dump - http://localhost:8529/collection/9496015:13658604?policy=last { "Hallo" : "Me" } HTTP/1.1 204 No Content diff --git a/Doxygen/Examples.AvocadoDB/rest11 b/Doxygen/Examples.AvocadoDB/rest11 index 6ccfbb1095..41f46de825 100644 --- a/Doxygen/Examples.AvocadoDB/rest11 +++ b/Doxygen/Examples.AvocadoDB/rest11 @@ -1,20 +1,12 @@ -> curl -X GET --dump - http://localhost:8529/_document/9496015:13658604 -HTTP/1.1 200 OK -content-type: application/json -connection: Keep-Alive -server: triagens GmbH High-Performance HTTP Server -etag: "14755542" -content-length: 27 - -{,"_id":"9496015:13658604"} - -> curl --data @- -X PUT --dump - http://localhost:8529/_document/9496015:13658604?_rev=1234567 +> curl --data @- -X PUT +> --dump - http://localhost:8529/collection/9496015:13658604?_rev=1234567 {} HTTP/1.1 409 Conflict content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 101 -{ "error" : true, "message" : "document /_document/9496015:13658604 is been altered", "code" : 409} +{ "error" : true, + "message" : "document /collection/9496015/13658604 is been altered", + "code" : 409 } diff --git a/Doxygen/Examples.AvocadoDB/rest12 b/Doxygen/Examples.AvocadoDB/rest12 index 6fda07eedc..45b862cfa5 100644 --- a/Doxygen/Examples.AvocadoDB/rest12 +++ b/Doxygen/Examples.AvocadoDB/rest12 @@ -1,18 +1,10 @@ -> curl -X GET --dump - http://localhost:8529/_document/9496015:13658604 -HTTP/1.1 200 OK -content-type: application/json -connection: Keep-Alive -server: triagens GmbH High-Performance HTTP Server -etag: "14755542" -content-length: 27 - -{,"_id":"9496015:13658604"} - -> curl -X DELETE --header 'etag: "13865833"' --dump - http://localhost:8529/_document/9496015:13658604 +> curl -X DELETE --header 'etag: "13865833"' +> --dump - http://localhost:8529/collection/9496015/13658604 HTTP/1.1 409 Conflict content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 101 -{ "error" : true, "message" : "document /_document/9496015:13658604 is been altered", "code" : 409} +{ "error" : true, + "message" : "document /collection/9496015/13658604 has been altered", + "code" : 409 } diff --git a/Doxygen/Examples.AvocadoDB/rest13 b/Doxygen/Examples.AvocadoDB/rest13 index 12691694c3..719c772185 100644 --- a/Doxygen/Examples.AvocadoDB/rest13 +++ b/Doxygen/Examples.AvocadoDB/rest13 @@ -1,17 +1,6 @@ -> curl -X GET --dump - http://localhost:8529/_document/9496015:13658604 -HTTP/1.1 200 OK -content-type: application/json -connection: Keep-Alive -server: triagens GmbH High-Performance HTTP Server -etag: "14755542" -content-length: 27 - -{"_id":"9496015:13658604"} - -> curl -X DELETE --dump - http://localhost:8529/_document/9496015:13658604 +> curl -X DELETE --dump - http://localhost:8529/collection/9496015/13658604 HTTP/1.1 204 No Content content-type: text/plain;charset=utf-8 connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server content-length: 0 - diff --git a/Doxygen/Examples.AvocadoDB/rest14 b/Doxygen/Examples.AvocadoDB/rest14 index bb19e92bad..10ed184491 100644 --- a/Doxygen/Examples.AvocadoDB/rest14 +++ b/Doxygen/Examples.AvocadoDB/rest14 @@ -1,8 +1,9 @@ -> curl -X DELETE --dump - http://localhost:8529/_document/9496015:13658604 +> curl -X DELETE --dump - http://localhost:8529/collection/9496015/13658604 HTTP/1.1 404 Not Found content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 95 -{ "error" : true, "message" : "document /_document/9496015:13658604 not found", "code" : 404} +{ "error" : true, + "message" : "document /collection/9496015/13658604 not found", + "code" : 404 } diff --git a/Doxygen/Examples.AvocadoDB/rest17 b/Doxygen/Examples.AvocadoDB/rest17 new file mode 100644 index 0000000000..dff42831a3 --- /dev/null +++ b/Doxygen/Examples.AvocadoDB/rest17 @@ -0,0 +1,9 @@ +> curl --dump - http://localhost:8529/collection/145169/2176785 +HTTP/1.1 404 Not Found +content-type: application/json +connection: Keep-Alive +server: triagens GmbH High-Performance HTTP Server + +{ "error" : true, + "message" : "collection /collection/145169 not found", + "code" : 404 } diff --git a/Doxygen/Examples.AvocadoDB/rest18 b/Doxygen/Examples.AvocadoDB/rest18 new file mode 100644 index 0000000000..3ae0c8075f --- /dev/null +++ b/Doxygen/Examples.AvocadoDB/rest18 @@ -0,0 +1,10 @@ +> curl -X GET --dump - http://localhost:8529/collection/example/9496015:13658604 +HTTP/1.1 200 OK +content-type: application/json +connection: Keep-Alive +server: triagens GmbH High-Performance HTTP Server +etag: "13658605" + +{ "Hallo" : "World", + "_id" : "9496015:13658604", + "_rev" : 13658605 } diff --git a/Doxygen/Examples.AvocadoDB/rest19 b/Doxygen/Examples.AvocadoDB/rest19 new file mode 100644 index 0000000000..279b5d57ae --- /dev/null +++ b/Doxygen/Examples.AvocadoDB/rest19 @@ -0,0 +1,7 @@ +> curl -X HEAD --dump - http://localhost:8529/collection/9496015/13658604 +HTTP/1.1 200 OK +content-type: application/json +connection: Keep-Alive +server: triagens GmbH High-Performance HTTP Server +etag: "13658605" +content-length: 0 diff --git a/Doxygen/Examples.AvocadoDB/rest2 b/Doxygen/Examples.AvocadoDB/rest2 index 34bad08f21..682097fba8 100644 --- a/Doxygen/Examples.AvocadoDB/rest2 +++ b/Doxygen/Examples.AvocadoDB/rest2 @@ -1,8 +1,9 @@ -> curl --dump - http://localhost:8529/_document/145168:2176785 +> curl --dump - http://localhost:8529/collection/145168/2176785 HTTP/1.1 404 Not Found content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 94 -{ "error" : true, "message" : "document /_document/145168:2176785 not found", "code" : 404} +{ "error" : true, + "message" : "document /collection/145168/2176785 not found", + "code" : 404 } diff --git a/Doxygen/Examples.AvocadoDB/rest20 b/Doxygen/Examples.AvocadoDB/rest20 new file mode 100644 index 0000000000..b90845d905 --- /dev/null +++ b/Doxygen/Examples.AvocadoDB/rest20 @@ -0,0 +1,14 @@ +> curl -X GET --dump - http://localhost:8529/collection/173560 +HTTP/1.1 200 OK +connection: Keep-Alive +content-type: application/json +server: triagens GmbH High-Performance HTTP Server + +{ "documents" : [ + "/collection/173560/1973117", + "/collection/173560/1854703", + "/collection/173560/1946150", + "/collection/173560/2075398", + "/collection/173560/1680888" + ] +} diff --git a/Doxygen/Examples.AvocadoDB/rest3 b/Doxygen/Examples.AvocadoDB/rest3 index 02f44f7a5e..41790794ea 100644 --- a/Doxygen/Examples.AvocadoDB/rest3 +++ b/Doxygen/Examples.AvocadoDB/rest3 @@ -1,4 +1,4 @@ -> curl --data '@'- -X POST --dump - http://localhost:8529/_document/9496015 +> curl --data @- -X POST --dump - http://localhost:8529/collection/9496015 { "Hallo" : "World" } HTTP/1.1 201 Created @@ -6,5 +6,5 @@ content-type: text/plain;charset=utf-8 connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server etag: "13323664" -location: /_document/9496015:13323664 +location: /collection/9496015/13323664 content-length: 0 diff --git a/Doxygen/Examples.AvocadoDB/rest4 b/Doxygen/Examples.AvocadoDB/rest4 index e16865d021..96ca2def38 100644 --- a/Doxygen/Examples.AvocadoDB/rest4 +++ b/Doxygen/Examples.AvocadoDB/rest4 @@ -1,10 +1,11 @@ -> curl --data '@'- -X POST --dump - http://localhost:8529/_document/9496016 +> curl --data @- -X POST --dump - http://localhost:8529/collection/9496016 { "Hallo" : "World" } HTTP/1.1 404 Not Found content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 90 -{ "error" : true, "message" : "collection /_collection/9496016 not found", "code" : 404} +{ "error" : true, + "message" : "collection /collection/9496016 not found", + "code" : 404} diff --git a/Doxygen/Examples.AvocadoDB/rest5 b/Doxygen/Examples.AvocadoDB/rest5 index a192f5ea02..948a061992 100644 --- a/Doxygen/Examples.AvocadoDB/rest5 +++ b/Doxygen/Examples.AvocadoDB/rest5 @@ -1,10 +1,11 @@ -> curl --data '@'- -X POST --dump - http://localhost:8529/_document/9496015 +> curl --data @- -X POST --dump - http://localhost:8529/collection/9496015 { Hallo } HTTP/1.1 400 Bad Request content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 71 -{ "error" : true, "message" : "expecting attribute name", "code" : 400} +{ "error" : true, + "message" : "expecting attribute name", + "code" : 400} diff --git a/Doxygen/Examples.AvocadoDB/rest6 b/Doxygen/Examples.AvocadoDB/rest6 index 716516bcee..97591ebb40 100644 --- a/Doxygen/Examples.AvocadoDB/rest6 +++ b/Doxygen/Examples.AvocadoDB/rest6 @@ -1,4 +1,4 @@ -> curl --data '@'- -X POST --dump - http://localhost:8529/_document/examples +> curl --data @- -X POST --dump - http://localhost:8529/collection/examples { "Hallo" : "World" } HTTP/1.1 201 Created @@ -6,5 +6,5 @@ content-type: text/plain;charset=utf-8 connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server etag: "13389200" -location: /_document/9496015:13389200 +location: /collection/9496015/13389200 content-length: 0 diff --git a/Doxygen/Examples.AvocadoDB/rest7 b/Doxygen/Examples.AvocadoDB/rest7 index b168d22432..c2f4b8448b 100644 --- a/Doxygen/Examples.AvocadoDB/rest7 +++ b/Doxygen/Examples.AvocadoDB/rest7 @@ -1,4 +1,4 @@ -> curl --data @- -X PUT --dump - http://localhost:8529/_document/9496015:13658604 +> curl --data @- -X PUT --dump - http://localhost:8529/collection/9496015/13658604 { "Hallo" : "You" } HTTP/1.1 204 No Content @@ -8,12 +8,13 @@ server: triagens GmbH High-Performance HTTP Server etag: "13865832" content-length: 0 -> curl -X GET --dump - http://localhost:8529/_document/9496015:13658604 +> curl -X GET --dump - http://localhost:8529/collection/9496015/13658604 HTTP/1.1 200 OK content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server etag: "13865832" -content-length: 41 -{"Hallo":"You","_id":"9496015:13658604"} +{ "Hallo" : "You", + "_id" : "9496015:13658604", + "_rev" : 13865832 } diff --git a/Doxygen/Examples.AvocadoDB/rest8 b/Doxygen/Examples.AvocadoDB/rest8 index d7914ac20f..57cafd3480 100644 --- a/Doxygen/Examples.AvocadoDB/rest8 +++ b/Doxygen/Examples.AvocadoDB/rest8 @@ -1,4 +1,4 @@ -> curl --data @- -X PUT --dump - http://localhost:8529/_document/9496015:13658605 +> curl --data @- -X PUT --dump - http://localhost:8529/collection/9496015/13658605 {} HTTP/1.1 404 Not Found @@ -7,4 +7,6 @@ connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server content-length: 95 -{ "error" : true, "message" : "document /_document/9496015:13658605 not found", "code" : 404} +{ "error" : true, + "message" : "document /collection/9496015/13658605 not found", + "code" : 404 } diff --git a/Doxygen/Examples.AvocadoDB/rest9 b/Doxygen/Examples.AvocadoDB/rest9 index 9cd8b500bf..98af0bb5a6 100644 --- a/Doxygen/Examples.AvocadoDB/rest9 +++ b/Doxygen/Examples.AvocadoDB/rest9 @@ -1,14 +1,16 @@ -> curl -X GET --dump - http://localhost:8529/_document/9496015:13658604 +> curl -X GET --dump - http://localhost:8529/collection/9496015/13658604 HTTP/1.1 200 OK content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server etag: "13865832" -content-length: 41 -{"Hallo":"You","_id":"9496015:13658604"} +{ "Hallo" : "You", + "_id" : "9496015:13658604" + "_rev" : 13865832 } ->curl --data @- -X PUT --header 'etag: "13865832"' --dump - http://localhost:8529/_document/9496015:13658604 +> curl --data @- -X PUT --header 'etag: "13865832"' +> --dump - http://localhost:8529/collection/9496015/13658604 { "Hallo" : "World" } HTTP/1.1 204 No Content @@ -18,13 +20,15 @@ server: triagens GmbH High-Performance HTTP Server etag: "14252313" content-length: 0 -> curl --data @- -X PUT --header 'etag: "13865832"' --dump - http://localhost:8529/_document/9496015:13658604 +> curl --data @- -X PUT --header 'etag: "13865832"' +> --dump - http://localhost:8529/_document/9496015/13658604 { "Hallo" : "World" } HTTP/1.1 409 Conflict content-type: application/json connection: Keep-Alive server: triagens GmbH High-Performance HTTP Server -content-length: 101 -{ "error" : true, "message" : "document /_document/9496015:13658604 is been altered", "code" : 409} +{ "error" : true, + "message" : "document /collection/9496015/13658604 has been altered", + "code" : 409 } diff --git a/Doxygen/Examples.Durham/collectiondef1 b/Doxygen/Examples.Durham/collectiondef1 index 93f85fdd91..6bf26f8221 100644 --- a/Doxygen/Examples.Durham/collectiondef1 +++ b/Doxygen/Examples.Durham/collectiondef1 @@ -1 +1 @@ -{collection-name} {collection-alias} +collection-name collection-alias diff --git a/Doxygen/Examples.Durham/collectionnames b/Doxygen/Examples.Durham/collectionnames index 1a9ae2c782..0d2d978727 100644 --- a/Doxygen/Examples.Durham/collectionnames +++ b/Doxygen/Examples.Durham/collectionnames @@ -1,3 +1,5 @@ users u locations locs visitors v +`select` s +`select` `select` diff --git a/Doxygen/Examples.Durham/fluent28 b/Doxygen/Examples.Durham/fluent28 index 4a60005787..14d351c274 100644 --- a/Doxygen/Examples.Durham/fluent28 +++ b/Doxygen/Examples.Durham/fluent28 @@ -1,2 +1,2 @@ -avocado> db.examples.all().next(); -{ "age" : 4, "name" : "Name4", "_id" : "148759:2114839" } +avocado> db.five.all().next(); +{ _id : 159896:1798296, _rev : 1798296, doc : 3 } diff --git a/Doxygen/Examples.Durham/geo1 b/Doxygen/Examples.Durham/geo1 new file mode 100644 index 0000000000..0800f824e5 --- /dev/null +++ b/Doxygen/Examples.Durham/geo1 @@ -0,0 +1,11 @@ +FROM users u +WITHIN d = ( [ users.x, users.y ], [ 10.3, 40.5 ], 10000 ) + +FROM users u +WITHIN d = ( users.x, users.y , 10.3, 40.5 , 10000 ) + +FROM users u +WITHIN d = ( [ users.x, users.y ], [ 10.3, 40.5 ], 25 ) + +FROM users u +WITHIN d = ( users.x, users.y, 10.3, 40.5, 25 ) diff --git a/Doxygen/Examples.Durham/geoquery b/Doxygen/Examples.Durham/geoquery new file mode 100644 index 0000000000..016007431b --- /dev/null +++ b/Doxygen/Examples.Durham/geoquery @@ -0,0 +1,5 @@ +FROM collection-name collection-alias +WITHIN geo-alias = ( document-coordinate, reference-coordinate, radius ) + +FROM collection-name collection-alias +NEAR geo-alias = ( document-coordinate, reference-coordinate, number-of-documents ) diff --git a/Doxygen/Examples.Durham/joinleft b/Doxygen/Examples.Durham/joinleft index 878d3fe174..8b6f82b7e5 100644 --- a/Doxygen/Examples.Durham/joinleft +++ b/Doxygen/Examples.Durham/joinleft @@ -1,3 +1,7 @@ SELECT { name : u.name, latitude : locs.latitude ? locs.latitude : null, longitude : locs.longitude ? locs.longitude : null } FROM users u LEFT JOIN locations locs ON (u.id == locs.uid) + +SELECT { name : u.name, latitude : locs.latitude ? locs.latitude : null, longitude : locs.longitude ? locs.longitude : null } +FROM locations locs +RIGHT JOIN users u ON (u.id == locs.uid) diff --git a/Doxygen/Examples.Durham/query0 b/Doxygen/Examples.Durham/query0 new file mode 100644 index 0000000000..d75b1a8d93 --- /dev/null +++ b/Doxygen/Examples.Durham/query0 @@ -0,0 +1 @@ +SELECT { name: u.name } FROM users u WHERE u.name == 'Fox' diff --git a/Doxygen/Examples.Durham/simple1 b/Doxygen/Examples.Durham/simple1 new file mode 100644 index 0000000000..073cc10184 --- /dev/null +++ b/Doxygen/Examples.Durham/simple1 @@ -0,0 +1,5 @@ +avocado> id = db.examples.save({ Hallo : "World" }); +"148759:5437094" + +avocado> doc = db.examples.document(id); +{ "Hallo" : "World", "_id" : "148759:5437094", "_rev" : 5437095 } diff --git a/Doxygen/Examples.Durham/simple10 b/Doxygen/Examples.Durham/simple10 new file mode 100644 index 0000000000..d6d1bc6340 --- /dev/null +++ b/Doxygen/Examples.Durham/simple10 @@ -0,0 +1,2 @@ +avocado> db.five.all().limit(2).count(true); +2 diff --git a/Doxygen/Examples.Durham/simple11 b/Doxygen/Examples.Durham/simple11 new file mode 100644 index 0000000000..171a4a6add --- /dev/null +++ b/Doxygen/Examples.Durham/simple11 @@ -0,0 +1,2 @@ +avocado> edges.edges-collection.edges("195189:1702517"); +[ { _id : 2030197:3537525, _rev : 3537525, _from : 195189:1702517, _to : 195189:1833589, label : knows } ] diff --git a/Doxygen/Examples.Durham/simple12 b/Doxygen/Examples.Durham/simple12 new file mode 100644 index 0000000000..9c559cfe9c --- /dev/null +++ b/Doxygen/Examples.Durham/simple12 @@ -0,0 +1,2 @@ +avocado> edges.edges-collection.inEdges("195189:1833589"); +[ { _id : 2030197:3537525, _rev : 3537525, _from : 195189:1702517, _to : 195189:1833589, label : knows } ] diff --git a/Doxygen/Examples.Durham/simple13 b/Doxygen/Examples.Durham/simple13 new file mode 100644 index 0000000000..03f35e0886 --- /dev/null +++ b/Doxygen/Examples.Durham/simple13 @@ -0,0 +1,2 @@ +avocado> edges.edges-collection.inEdges("195189:1702517"); +[ { _id : 2030197:3537525, _rev : 3537525, _from : 195189:1702517, _to : 195189:1833589, label : knows } ] diff --git a/Doxygen/Examples.Durham/simple14 b/Doxygen/Examples.Durham/simple14 new file mode 100644 index 0000000000..44bdd10408 --- /dev/null +++ b/Doxygen/Examples.Durham/simple14 @@ -0,0 +1,14 @@ +avocado> db.geo.ensureGeoIndex("loc"); +162534834 + +avocado> for (i = -90; i <= 90; i += 10) +.......> for (j = -180; j <= 180; j += 10) +.......> db.geo.save({ name : "Name/" + i + "/" + j, +.......> loc: [ i, j ] }); + +avocado> db.geo.count(); +703 + +avocado> db.geo.near(0,0).limit(2).toArray(); +[ { _id : 131840:24773376, _rev : 24773376, name : Name/0/0, loc : [ 0, 0 ] }, + { _id : 131840:22348544, _rev : 22348544, name : Name/-10/0, loc : [ -10, 0 ] } ] diff --git a/Doxygen/Examples.Durham/simple15 b/Doxygen/Examples.Durham/simple15 new file mode 100644 index 0000000000..1c9c3615af --- /dev/null +++ b/Doxygen/Examples.Durham/simple15 @@ -0,0 +1,3 @@ +avocado> db.geo.near(0,0).distance().limit(2).toArray(); +[ { _id : 131840:24773376, _rev : 24773376, distance : 0, name : Name/0/0, loc : [ 0, 0 ] }, + { _id : 131840:22348544, _rev : 22348544, distance : 1111949.3, name : Name/-10/0, loc : [ -10, 0 ] } ] diff --git a/Doxygen/Examples.Durham/simple16 b/Doxygen/Examples.Durham/simple16 new file mode 100644 index 0000000000..375365276b --- /dev/null +++ b/Doxygen/Examples.Durham/simple16 @@ -0,0 +1,27 @@ +avocado> for (i = -90; i <= 90; i += 10) +.......> for (j = -180; j <= 180; j += 10) +.......> db.complex.save({ name : "Name/" + i + "/" + j, +.......> home : [ i, j ], +.......> work : [ -i, -j ] }); + +avocado> db.complex.near(0, 170).limit(5); +exception in file '/simple-query' at 1018,5: an geo-index must be known + +avocado> db.complex.ensureGeoIndex("home"); +avocado> db.complex.near(0, 170).limit(5).toArray(); +[ { _id : 48834092:74655276, _rev : 74655276, name : Name/0/170, home : [ 0, 170 ], work : [ 0, -170 ] }, + { _id : 48834092:74720812, _rev : 74720812, name : Name/0/180, home : [ 0, 180 ], work : [ 0, -180 ] }, + { _id : 48834092:77080108, _rev : 77080108, name : Name/10/170, home : [ 10, 170 ], work : [ -10, -170 ] }, + { _id : 48834092:72230444, _rev : 72230444, name : Name/-10/170, home : [ -10, 170 ], work : [ 10, -170 ] }, + { _id : 48834092:72361516, _rev : 72361516, name : Name/0/-180, home : [ 0, -180 ], work : [ 0, 180 ] } ] + +avocado> db.complex.geo("work").near(0, 170).limit(5); +exception in file '/simple-query' at 1018,5: an geo-index must be known + +avocado> db.complex.ensureGeoIndex("work"); +avocado> db.complex.geo("work").near(0, 170).limit(5).toArray(); +[ { _id : 48834092:72427052, _rev : 72427052, name : Name/0/-170, home : [ 0, -170 ], work : [ 0, 170 ] }, + { _id : 48834092:72361516, _rev : 72361516, name : Name/0/-180, home : [ 0, -180 ], work : [ 0, 180 ] }, + { _id : 48834092:70002220, _rev : 70002220, name : Name/-10/-170, home : [ -10, -170 ], work : [ 10, 170 ] }, + { _id : 48834092:74851884, _rev : 74851884, name : Name/10/-170, home : [ 10, -170 ], work : [ -10, 170 ] }, + { _id : 48834092:74720812, _rev : 74720812, name : Name/0/180, home : [ 0, 180 ], work : [ 0, -180 ] } ] diff --git a/Doxygen/Examples.Durham/simple17 b/Doxygen/Examples.Durham/simple17 new file mode 100644 index 0000000000..116df82511 --- /dev/null +++ b/Doxygen/Examples.Durham/simple17 @@ -0,0 +1,10 @@ +avocado> db.geo.within(0, 0, 2000 * 1000).distance().toArray(); +[ { _id : 131840:24773376, _rev : 24773376, distance : 0, name : Name/0/0, loc : [ 0, 0 ] }, + { _id : 131840:24707840, _rev : 24707840, distance : 1111949.3, name : Name/0/-10, loc : [ 0, -10 ] }, + { _id : 131840:24838912, _rev : 24838912, distance : 1111949.3, name : Name/0/10, loc : [ 0, 10 ] }, + { _id : 131840:22348544, _rev : 22348544, distance : 1111949.3, name : Name/-10/0, loc : [ -10, 0 ] }, + { _id : 131840:27198208, _rev : 27198208, distance : 1111949.3, name : Name/10/0, loc : [ 10, 0 ] }, + { _id : 131840:22414080, _rev : 22414080, distance : 1568520.6, name : Name/-10/10, loc : [ -10, 10 ] }, + { _id : 131840:27263744, _rev : 27263744, distance : 1568520.6, name : Name/10/10, loc : [ 10, 10 ] }, + { _id : 131840:22283008, _rev : 22283008, distance : 1568520.6, name : Name/-10/-10, loc : [ -10, -10 ] }, + { _id : 131840:27132672, _rev : 27132672, distance : 1568520.6, name : Name/10/-10, loc : [ 10, -10 ] } ] diff --git a/Doxygen/Examples.Durham/simple2 b/Doxygen/Examples.Durham/simple2 new file mode 100644 index 0000000000..22095276b5 --- /dev/null +++ b/Doxygen/Examples.Durham/simple2 @@ -0,0 +1,14 @@ +avocado> db.five.all().toArray(); +[ { _id : 159896:1798296, _rev : 1798296, doc : 3 }, + { _id : 159896:1732760, _rev : 1732760, doc : 2 }, + { _id : 159896:1863832, _rev : 1863832, doc : 4 }, + { _id : 159896:1667224, _rev : 1667224, doc : 1 }, + { _id : 159896:1929368, _rev : 1929368, doc : 5 } ] + +avocado> db.five.all().limit(2).toArray(); +[ { _id : 159896:1798296, _rev : 1798296, doc : 3 }, + { _id : 159896:1732760, _rev : 1732760, doc : 2 } ] + +avocado> db.five.all().limit(-2); +[ { _id : 159896:1667224, _rev : 1667224, doc : 1 }, + { _id : 159896:1929368, _rev : 1929368, doc : 5 } ] diff --git a/Doxygen/Examples.Durham/simple3 b/Doxygen/Examples.Durham/simple3 new file mode 100644 index 0000000000..a58a3f3e54 --- /dev/null +++ b/Doxygen/Examples.Durham/simple3 @@ -0,0 +1,6 @@ +avocado> db.five.all().toArray(); +[ { _id : 159896:1798296, _rev : 1798296, doc : 3 }, + { _id : 159896:1732760, _rev : 1732760, doc : 2 }, + { _id : 159896:1863832, _rev : 1863832, doc : 4 }, + { _id : 159896:1667224, _rev : 1667224, doc : 1 }, + { _id : 159896:1929368, _rev : 1929368, doc : 5 } ] diff --git a/Doxygen/Examples.Durham/simple4 b/Doxygen/Examples.Durham/simple4 new file mode 100644 index 0000000000..47580f3d7b --- /dev/null +++ b/Doxygen/Examples.Durham/simple4 @@ -0,0 +1,7 @@ +avocado> var a = db.five.all(); +avocado> while (a.hasNext()) print(a.next()); +{ _id : 159896:1798296, _rev : 1798296, doc : 3 } +{ _id : 159896:1732760, _rev : 1732760, doc : 2 } +{ _id : 159896:1863832, _rev : 1863832, doc : 4 } +{ _id : 159896:1667224, _rev : 1667224, doc : 1 } +{ _id : 159896:1929368, _rev : 1929368, doc : 5 } diff --git a/Doxygen/Examples.Durham/simple5 b/Doxygen/Examples.Durham/simple5 new file mode 100644 index 0000000000..14d351c274 --- /dev/null +++ b/Doxygen/Examples.Durham/simple5 @@ -0,0 +1,2 @@ +avocado> db.five.all().next(); +{ _id : 159896:1798296, _rev : 1798296, doc : 3 } diff --git a/Doxygen/Examples.Durham/simple6 b/Doxygen/Examples.Durham/simple6 new file mode 100644 index 0000000000..4e53ca8907 --- /dev/null +++ b/Doxygen/Examples.Durham/simple6 @@ -0,0 +1,2 @@ +avocado> db.five.all().nextRef(); +159896:1798296 diff --git a/Doxygen/Examples.Durham/simple7 b/Doxygen/Examples.Durham/simple7 new file mode 100644 index 0000000000..47580f3d7b --- /dev/null +++ b/Doxygen/Examples.Durham/simple7 @@ -0,0 +1,7 @@ +avocado> var a = db.five.all(); +avocado> while (a.hasNext()) print(a.next()); +{ _id : 159896:1798296, _rev : 1798296, doc : 3 } +{ _id : 159896:1732760, _rev : 1732760, doc : 2 } +{ _id : 159896:1863832, _rev : 1863832, doc : 4 } +{ _id : 159896:1667224, _rev : 1667224, doc : 1 } +{ _id : 159896:1929368, _rev : 1929368, doc : 5 } diff --git a/Doxygen/Examples.Durham/simple8 b/Doxygen/Examples.Durham/simple8 new file mode 100644 index 0000000000..1b746fb068 --- /dev/null +++ b/Doxygen/Examples.Durham/simple8 @@ -0,0 +1,10 @@ +avocado> db.five.all().toArray(); +[ { _id : 159896:1798296, _rev : 1798296, doc : 3 }, + { _id : 159896:1732760, _rev : 1732760, doc : 2 }, + { _id : 159896:1863832, _rev : 1863832, doc : 4 }, + { _id : 159896:1667224, _rev : 1667224, doc : 1 }, + { _id : 159896:1929368, _rev : 1929368, doc : 5 } ] + +avocado> db.five.all().skip(3).toArray(); +[ { _id : 159896:1667224, _rev : 1667224, doc : 1 }, + { _id : 159896:1929368, _rev : 1929368, doc : 5 } ] diff --git a/Doxygen/Examples.Durham/simple9 b/Doxygen/Examples.Durham/simple9 new file mode 100644 index 0000000000..48f2d18885 --- /dev/null +++ b/Doxygen/Examples.Durham/simple9 @@ -0,0 +1,2 @@ +avocado> db.five.all().limit(2).count(); +5 diff --git a/Doxygen/Scripts/pandoc.sh b/Doxygen/Scripts/pandoc.sh index 26ffd68054..b80e75ce4f 100755 --- a/Doxygen/Scripts/pandoc.sh +++ b/Doxygen/Scripts/pandoc.sh @@ -8,5 +8,6 @@ pandoc -f markdown -t markdown -o $OUTPUT.tmp $INPUT || exit 1 cat $OUTPUT.tmp \ | sed -e 's:\(GET\|PUT\|DELETE\|POST\) /\\_:\1 /_:g' \ | sed -e 's:^/\\_:/_:g' \ + | sed -e 's:\*:_:g' \ > $OUTPUT || exit 1 rm -f $OUTPUT.tmp diff --git a/Doxygen/Scripts/xml2md.py b/Doxygen/Scripts/xml2md.py index c289b64b2c..66a292d9ed 100644 --- a/Doxygen/Scripts/xml2md.py +++ b/Doxygen/Scripts/xml2md.py @@ -126,8 +126,10 @@ replDict["e_row"] = "" replDict["s_sect1"] = "" replDict["s_sect2"] = "" +replDict["s_sect3"] = "" replDict["e_sect1"] = "" replDict["e_sect2"] = "" +replDict["e_sect3"] = "" replDict["s_table"] = "\n{| %s\n" % table_format replDict["e_table"] = "\n|}\n" @@ -135,9 +137,11 @@ replDict["e_table"] = "\n|}\n" replDict["s_title_1"] = "# " replDict["s_title_2"] = "## " replDict["s_title_3"] = "### " +replDict["s_title_4"] = "#### " replDict["e_title_1"] = "\n\n" replDict["e_title_2"] = "\n\n" replDict["e_title_3"] = "\n\n" +replDict["e_title_4"] = "\n\n" replDict["s_ulink"] = "[" replDict["e_ulink"] = "]" @@ -183,12 +187,14 @@ gencDict["row"] = True gencDict["sect1"] = False gencDict["sect2"] = False +gencDict["sect3"] = False gencDict["table"] = True gencDict["title_1"] = True gencDict["title_2"] = True gencDict["title_3"] = True +gencDict["title_4"] = True gencDict["ulink"] = True @@ -225,7 +231,7 @@ path = [] gencode = [] ################################################################################ -#### @brief titel level (sect1, sect2) +#### @brief titel level (sect1, sect2, sect3) ################################################################################ titlevel = 1 @@ -271,6 +277,7 @@ def start_element(name, attrs): if name == "sect1": titlevel = 2 elif name == "sect2": titlevel = 3 + elif name == "sect3": titlevel = 4 elif name == "entry": tabentry = True elif name == "verbatim": verbatim = True elif name == "itemizedlist": listlevel = listlevel + 1 @@ -293,7 +300,7 @@ def start_element(name, attrs): genc = gencDict["%s" % name] #endif - if name == "sect1" or name == "sect2": + if name == "sect1" or name == "sect2" or name == "sect3": text += "\n\n" % convert_link(attrs['id'], True) gencode.append(genc) @@ -331,6 +338,7 @@ def end_element(name): if name == "sect1": titlevel = 1 elif name == "sect2": titlevel = 2 + elif name == "sect3": titlevel = 3 elif name == "listitem": listitem = False elif name == "entry": tabentry = False elif name == "verbatim": verbatim = False diff --git a/Doxygen/avocado.doxy.in b/Doxygen/avocado.doxy.in index 5c90c726d7..d29d01f6a2 100644 --- a/Doxygen/avocado.doxy.in +++ b/Doxygen/avocado.doxy.in @@ -206,6 +206,7 @@ ALIASES += CMDOPT{1}="\1" ALIASES += CA{1}="\1" ALIASES += CO{1}="\1" ALIASES += REST{1}="\1" +ALIASES += EXAMPLES="Examples
" # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. diff --git a/Doxygen/js/bootstrap/modules.c b/Doxygen/js/bootstrap/modules.c index 60da7c3b68..f445775c1c 100644 --- a/Doxygen/js/bootstrap/modules.c +++ b/Doxygen/js/bootstrap/modules.c @@ -216,13 +216,15 @@ void dummy_251 (); ///
  • @ref JSModuleInternalLoad "internal.load"
  • ///
  • @ref JSModuleInternalLogLevel "internal.log"
  • ///
  • @ref JSModuleInternalLogLevel "internal.logLevel"
  • +///
  • @ref JSModuleInternalOutput "internal.output"
  • +///
  • @ref JSModuleInternalProcessStat "internal.processStat"
  • ///
  • @ref JSModuleInternalRead "internal.read"
  • ///
  • @ref JSModuleInternalSPrintF "internal.sprintf"
  • ///
  • @ref JSModuleInternalTime "internal.time"
  • /// //////////////////////////////////////////////////////////////////////////////// -void dummy_265 (); +void dummy_267 (); //////////////////////////////////////////////////////////////////////////////// /// @page JSModuleInternal Module "internal" @@ -245,6 +247,9 @@ void dummy_265 (); /// @anchor JSModuleInternalLogLevel /// @copydetails JS_LogLevel /// +/// @anchor JSModuleInternalOutput +/// @copydetails JS_Output +/// /// @anchor JSModuleInternalRead /// @copydetails JS_Read /// @@ -255,21 +260,21 @@ void dummy_265 (); /// @copydetails JS_Time //////////////////////////////////////////////////////////////////////////////// -void dummy_296 (); +void dummy_301 (); //////////////////////////////////////////////////////////////////////////////// /// @addtogroup V8ModuleInternal /// @{ //////////////////////////////////////////////////////////////////////////////// -void dummy_301 (); +void dummy_306 (); //////////////////////////////////////////////////////////////////////////////// /// @brief internal module //////////////////////////////////////////////////////////////////////////////// -void dummy_316 (); +void dummy_322 (); //////////////////////////////////////////////////////////////////////////////// /// @brief reads a file @@ -297,13 +302,13 @@ void JSF_internal_loadFile (int path) {} /// @} //////////////////////////////////////////////////////////////////////////////// -void dummy_376 (); +void dummy_382 (); // ----------------------------------------------------------------------------- // --SECTION-- Module "console" // ----------------------------------------------------------------------------- -void dummy_380 (); +void dummy_386 (); //////////////////////////////////////////////////////////////////////////////// /// @page JSModuleConsoleTOC @@ -317,7 +322,7 @@ void dummy_380 (); /// //////////////////////////////////////////////////////////////////////////////// -void dummy_392 (); +void dummy_398 (); //////////////////////////////////////////////////////////////////////////////// /// @page JSModuleConsole Module "console" @@ -345,14 +350,14 @@ void dummy_392 (); /// @copydetails JSF_CONSOLE_WARN //////////////////////////////////////////////////////////////////////////////// -void dummy_418 (); +void dummy_424 (); //////////////////////////////////////////////////////////////////////////////// /// @addtogroup V8ModuleConsole /// @{ //////////////////////////////////////////////////////////////////////////////// -void dummy_423 (); +void dummy_429 (); //////////////////////////////////////////////////////////////////////////////// /// @brief logs debug message @@ -426,13 +431,13 @@ void JSF_CONSOLE_WARN () {} //////////////////////////////////////////////////////////////////////////////// -void dummy_522 (); +void dummy_528 (); //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// -void dummy_526 (); +void dummy_532 (); // Local Variables: // mode: outline-minor diff --git a/Doxygen/js/bootstrap/print.c b/Doxygen/js/bootstrap/print.c index da908adad3..933a840ac1 100644 --- a/Doxygen/js/bootstrap/print.c +++ b/Doxygen/js/bootstrap/print.c @@ -49,7 +49,7 @@ void dummy_39 (); /// Only available in shell mode. /// /// Prints the arguments. If an argument is an object having a -/// function @FN{PRINT}, then this function is called. Otherwise @FN{toJson} is +/// function @FN{_PRINT}, then this function is called. Otherwise @FN{toJson} is /// used. A final newline is printed /// /// @verbinclude fluent40 @@ -92,11 +92,12 @@ void dummy_124 (); /// @brief JSON representation of an array //////////////////////////////////////////////////////////////////////////////// -void JSF_Array_prototype_PRINT (int seen, int path, int names) {} +void dummy_147 (); + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -120,7 +121,8 @@ void dummy_160 (); /// @brief prints a function //////////////////////////////////////////////////////////////////////////////// -void JSF_Function_prototype_PRINT (int ) {} + +void dummy_168 (); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/Doxygen/js/modules/graph.c b/Doxygen/js/modules/graph.c index bfeee6b2ec..a4d2e54065 100644 --- a/Doxygen/js/modules/graph.c +++ b/Doxygen/js/modules/graph.c @@ -376,7 +376,8 @@ void dummy_435 (); /// @brief edge printing //////////////////////////////////////////////////////////////////////////////// -void JSF_Edge_prototype_PRINT (int seen, int path, int names) {} + +void dummy_448 (); //////////////////////////////////////////////////////////////////////////////// /// @} @@ -672,7 +673,8 @@ void dummy_879 (); /// @brief vertex representation //////////////////////////////////////////////////////////////////////////////// -void JSF_Vertex_prototype_PRINT (int seen, int path, int names) {} + +void dummy_892 (); //////////////////////////////////////////////////////////////////////////////// /// @} @@ -833,7 +835,6 @@ void JSF_iterator (int ) {} -void JSF_this_PRINT (int seen, int path, int names) {} //////////////////////////////////////////////////////////////////////////////// @@ -856,7 +857,6 @@ void JSF_iterator (int ) {} -void JSF_this_PRINT (int seen, int path, int names) {} //////////////////////////////////////////////////////////////////////////////// @@ -927,7 +927,8 @@ void JSF_Graph_prototype_constructEdge (int id) {} /// @brief graph printing //////////////////////////////////////////////////////////////////////////////// -void JSF_Graph_prototype_PRINT (int seen, int path, int names) {} + +void dummy_1256 (); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/Doxygen/js/server/modules.c b/Doxygen/js/server/modules.c index c8eee306d6..9dac864ab7 100644 --- a/Doxygen/js/server/modules.c +++ b/Doxygen/js/server/modules.c @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2011-2012 triagens 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. @@ -22,36 +22,109 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// void dummy_28 (); +//////////////////////////////////////////////////////////////////////////////// +/// @page JSModuleAvocadoTOC +/// +///
      +///
    1. @ref JSModuleAvocadoDefineHttpSystemAction "avocado.defineHttpSystemAction"
    2. +///
    +//////////////////////////////////////////////////////////////////////////////// + +void dummy_36 (); + +//////////////////////////////////////////////////////////////////////////////// +/// @page JSModuleAvocado Module "avocado" +/// +/// The following functions are used avocadoly. +/// +///
    +/// @copydoc JSModuleAvocadoTOC +///
    +/// +/// @anchor JSModuleAvocadoDefineHttpSystemAction +/// @copydetails JS_DefineSystemAction +//////////////////////////////////////////////////////////////////////////////// + +void dummy_49 (); + // ----------------------------------------------------------------------------- -// --SECTION-- Module +// --SECTION-- Module "internal" // ----------------------------------------------------------------------------- -void dummy_32 (); +void dummy_53 (); //////////////////////////////////////////////////////////////////////////////// /// @addtogroup V8ModuleInternal /// @{ //////////////////////////////////////////////////////////////////////////////// -void dummy_37 (); +void dummy_58 (); //////////////////////////////////////////////////////////////////////////////// /// @brief internal module //////////////////////////////////////////////////////////////////////////////// -void dummy_46 (); +void dummy_67 (); //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// -void dummy_50 (); +void dummy_71 (); + +// ----------------------------------------------------------------------------- +// --SECTION-- Module "avocado" +// ----------------------------------------------------------------------------- + +void dummy_75 (); + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup V8ModuleAvocado +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +void dummy_80 (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief avocado module +//////////////////////////////////////////////////////////////////////////////// + + + + +void dummy_92 (); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +void dummy_96 (); + +// ----------------------------------------------------------------------------- +// --SECTION-- Module "simple-query" +// ----------------------------------------------------------------------------- + +void dummy_100 (); + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup V8ModuleSimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + + +void dummy_112 (); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +void dummy_116 (); // Local Variables: // mode: outline-minor diff --git a/Doxygen/js/server/shell.c b/Doxygen/js/server/shell.c index 6d2f12b2a0..1e85451d9d 100644 --- a/Doxygen/js/server/shell.c +++ b/Doxygen/js/server/shell.c @@ -59,34 +59,44 @@ void dummy_51 (); /// @brief prints a query //////////////////////////////////////////////////////////////////////////////// -void JSF_AvocadoFluentQuery_prototype_PRINT (int ) {} +void dummy_79 (); + //////////////////////////////////////////////////////////////////////////////// /// @brief prints a query //////////////////////////////////////////////////////////////////////////////// -void JSF_AvocadoFluentQuery2_prototype_PRINT (int ) {} +void dummy_107 (); + //////////////////////////////////////////////////////////////////////////////// /// @brief prints a query //////////////////////////////////////////////////////////////////////////////// -void JSF_AvocadoCursor_prototype_PRINT (int ) {} +void dummy_135 (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief prints a shaped json +//////////////////////////////////////////////////////////////////////////////// + + +void dummy_148 (); + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// -void dummy_139 (); +void dummy_152 (); // Local Variables: // mode: outline-minor diff --git a/Doxygen/js/system/collections.c b/Doxygen/js/system/collections.c index f60587e1b0..8b0c0322de 100644 --- a/Doxygen/js/system/collections.c +++ b/Doxygen/js/system/collections.c @@ -25,20 +25,21 @@ /// @author Copyright 2011, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -void dummy_28 (); + +void dummy_30 (); // ----------------------------------------------------------------------------- // --SECTION-- administration actions // ----------------------------------------------------------------------------- -void dummy_32 (); +void dummy_34 (); //////////////////////////////////////////////////////////////////////////////// /// @addtogroup ActionsAdmin /// @{ //////////////////////////////////////////////////////////////////////////////// -void dummy_37 (); +void dummy_39 (); //////////////////////////////////////////////////////////////////////////////// /// @brief returns information about all collections @@ -61,12 +62,13 @@ void dummy_37 (); /// @verbinclude rest15 //////////////////////////////////////////////////////////////////////////////// -void JSA_collections () {} +void dummy_87 (); + //////////////////////////////////////////////////////////////////////////////// /// @brief loads a collection /// @@ -77,9 +79,10 @@ void JSA_collections () {} /// @verbinclude restX //////////////////////////////////////////////////////////////////////////////// -void JSA_collection_load () {} +void dummy_115 (); + //////////////////////////////////////////////////////////////////////////////// /// @brief information about a collection /// @@ -90,22 +93,24 @@ void JSA_collection_load () {} /// @verbinclude rest16 //////////////////////////////////////////////////////////////////////////////// -void JSA_collection_info () {} +void dummy_147 (); + //////////////////////////////////////////////////////////////////////////////// /// @brief returns information about all documents /// /// @REST{GET /_system/documents} //////////////////////////////////////////////////////////////////////////////// -void JSA_documents () {} + +void dummy_166 (); //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// -void dummy_168 (); +void dummy_170 (); // Local Variables: // mode: outline-minor diff --git a/Doxygen/js/system/indexes.c b/Doxygen/js/system/indexes.c index d2d93a4bf1..2b1340ee26 100644 --- a/Doxygen/js/system/indexes.c +++ b/Doxygen/js/system/indexes.c @@ -25,20 +25,21 @@ /// @author Copyright 2011, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -void dummy_28 (); + +void dummy_30 (); // ----------------------------------------------------------------------------- // --SECTION-- administration actions // ----------------------------------------------------------------------------- -void dummy_32 (); +void dummy_34 (); //////////////////////////////////////////////////////////////////////////////// /// @addtogroup ActionsAdmin /// @{ //////////////////////////////////////////////////////////////////////////////// -void dummy_37 (); +void dummy_39 (); //////////////////////////////////////////////////////////////////////////////// /// @brief returns information about all indexes of a collection @@ -48,14 +49,15 @@ void dummy_37 (); /// Returns information about all indexes of a collection of the database. //////////////////////////////////////////////////////////////////////////////// -void JSA_collection_indexes () {} +void dummy_68 (); + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// -void dummy_70 (); +void dummy_72 (); // Local Variables: // mode: outline-minor diff --git a/GeneralServer/GeneralServerDispatcher.h b/GeneralServer/GeneralServerDispatcher.h index b128208f79..a55b79b387 100644 --- a/GeneralServer/GeneralServerDispatcher.h +++ b/GeneralServer/GeneralServerDispatcher.h @@ -92,11 +92,11 @@ namespace triagens { // directly execute the handler within the scheduler thread if (handler->isDirect()) { - Handler::status_e status = handleRequestDirectly(task, handler); + Handler::status_e status = this->handleRequestDirectly(task, handler); if (status != Handler::HANDLER_REQUEUE) { done = true; - destroyHandler(handler); + this->destroyHandler(handler); } else { continue; @@ -109,7 +109,7 @@ namespace triagens { if (atask == 0) { LOGGER_WARNING << "task is indirect, but not asynchronous"; - destroyHandler(handler); + this->destroyHandler(handler); return false; } else { @@ -127,7 +127,7 @@ namespace triagens { else { LOGGER_WARNING << "no dispatcher is known"; - destroyHandler(handler); + this->destroyHandler(handler); return false; } } diff --git a/GeoIndex/GeoIndex.c b/GeoIndex/GeoIndex.c index 50558420c0..8f30d9a5ef 100644 --- a/GeoIndex/GeoIndex.c +++ b/GeoIndex/GeoIndex.c @@ -1,28 +1,28 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief geo index -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author R. A. Parker -/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany +///// @brief geo index +///// +///// @file +///// +///// DISCLAIMER +///// +///// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany +///// +///// @author R. A. Parker +///// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// /* GeoIndex.c - GeoIndex algorithms */ diff --git a/GeoIndex/GeoIndex.h b/GeoIndex/GeoIndex.h index 55a3dc807f..b8d1b9fc1d 100644 --- a/GeoIndex/GeoIndex.h +++ b/GeoIndex/GeoIndex.h @@ -1,28 +1,28 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief geo index -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author R. A. Parker -/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany +///// @brief geo index +///// +///// @file +///// +///// DISCLAIMER +///// +///// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany +///// +///// @author R. A. Parker +///// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// /* GeoIndex.h - header file for GeoIndex algorithms */ @@ -37,6 +37,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + /* first the things that a user might want to change */ /* a GeoString - a signed type of at least 64 bits */ @@ -113,4 +117,8 @@ void GeoIndex_INDEXDUMP(GeoIndex * gi, FILE * f); int GeoIndex_INDEXVALID(GeoIndex * gi); #endif +#ifdef __cplusplus +} +#endif + /* end of GeoIndex.h */ diff --git a/HashIndex/hashindex.c b/HashIndex/hashindex.c new file mode 100755 index 0000000000..e5205f59b7 --- /dev/null +++ b/HashIndex/hashindex.c @@ -0,0 +1,651 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief geo index +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright by triAGENS GmbH - All rights reserved. +/// +/// The Programs (which include both the software and documentation) +/// contain proprietary information of triAGENS GmbH; they are +/// provided under a license agreement containing restrictions on use and +/// disclosure and are also protected by copyright, patent and other +/// intellectual and industrial property laws. Reverse engineering, +/// disassembly or decompilation of the Programs, except to the extent +/// required to obtain interoperability with other independently created +/// software or as specified by law, is prohibited. +/// +/// The Programs are not intended for use in any nuclear, aviation, mass +/// transit, medical, or other inherently dangerous applications. It shall +/// be the licensee's responsibility to take all appropriate fail-safe, +/// backup, redundancy, and other measures to ensure the safe use of such +/// applications if the Programs are used for such purposes, and triAGENS +/// GmbH disclaims liability for any damages caused by such use of +/// the Programs. +/// +/// This software is the confidential and proprietary information of +/// triAGENS GmbH. You shall not disclose such confidential and +/// proprietary information and shall use it only in accordance with the +/// terms of the license agreement you entered into with triAGENS GmbH. +/// +/// Copyright holder is triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. O +/// @author Copyright 2011, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "hashindex.h" + +static bool isEqualJsonJson (const TRI_json_t* left, const TRI_json_t* right) { + + if (left == NULL && right == NULL) { + return true; + } + + if (left == NULL && right != NULL) { + return false; + } + + if (left != NULL && right == NULL) { + return false; + } + + if (left->_type != right->_type) { + return false; + } + + switch (left->_type) { + + case TRI_JSON_UNUSED: { + return true; + } + + case TRI_JSON_NULL: { + return true; + } + + case TRI_JSON_BOOLEAN: { + return ( left->_value._boolean == right->_value._boolean ); + } + + case TRI_JSON_NUMBER: { + return ( left->_value._number == right->_value._number ); + } + + + case TRI_JSON_STRING: { + if (left->_value._string.length == right->_value._string.length) { + return (memcmp(left->_value._string.data, right->_value._string.data, + left->_value._string.length) == 0); + } + return false; + } + + + case TRI_JSON_ARRAY: { + // order not defined here -- need special case here + if (left->_value._objects._length != right->_value._objects._length) { + return false; + } + + for (size_t j = 0; j < left->_value._objects._length; ++j) { + if (!isEqualJsonJson( (TRI_json_t*)(TRI_AtVector(&(left->_value._objects),j)), + (TRI_json_t*)(TRI_AtVector(&(right->_value._objects),j)) + ) + ) { + return false; + } + } + return true; + } + + case TRI_JSON_LIST: { + + if (left->_value._objects._length != right->_value._objects._length) { + return false; + } + + for (size_t j = 0; j < left->_value._objects._length; ++j) { + if (!isEqualJsonJson( (TRI_json_t*)(TRI_AtVector(&(left->_value._objects),j)), + (TRI_json_t*)(TRI_AtVector(&(right->_value._objects),j)) + ) + ) { + return false; + } + } + return true; + } + } // end of switch statement + assert(false); + return false; +} // end of function isEqualJsonJson + + +static bool isEqualShapedJsonShapedJson (const TRI_shaped_json_t* left, const TRI_shaped_json_t* right) { + + int result; + + if (left == NULL && right == NULL) { + return true; + } + + if (left == NULL && right != NULL) { + return false; + } + + if (left != NULL && right == NULL) { + return false; + } + + if (left->_data.length != right->_data.length) { + return false; + } + + return ( memcmp(left->_data.data,right->_data.data, left->_data.length) == 0); +} // end of function isEqualShapedJsonShapedJson + + +static uint64_t hashJson (const size_t hash, const TRI_json_t* data) { + + size_t newHash; + + if (data == NULL) { + return hash; + } + + switch (data->_type) { + + case TRI_JSON_UNUSED: { + return hash; + } + + case TRI_JSON_NULL: { + return hash; + } + + case TRI_JSON_BOOLEAN: { + return TRI_FnvHashBlock(hash, (const char*)(&(data->_value._boolean)), sizeof(bool)); + // return TRI_BlockCrc32(hash, (const char*)(&(data->_value._boolean)), sizeof(bool)); + } + + case TRI_JSON_NUMBER: { + return TRI_FnvHashBlock(hash, (const char*)(&(data->_value._number)), sizeof(double)); + //return TRI_BlockCrc32(hash, (const char*)(&(data->_value._number)), sizeof(double)); + } + + case TRI_JSON_STRING: { + if (data->_value._string.length > 0) { + return TRI_FnvHashBlock(hash, data->_value._string.data, data->_value._string.length); + //return TRI_BlockCrc32(hash, data->_value._string.data, data->_value._string.length); + } + return hash; + } + + + case TRI_JSON_ARRAY: { + // order not defined here -- need special case here + if (data->_value._objects._length > 0) { + newHash = hash; + for (size_t j = 0; j < data->_value._objects._length; ++j) { + newHash = hashJson(newHash, (TRI_json_t*)(TRI_AtVector(&(data->_value._objects),j)) ); + } + return newHash; + } + else { + return hash; + } + } + + case TRI_JSON_LIST: { + if (data->_value._objects._length > 0) { + newHash = hash; + for (size_t j = 0; j < data->_value._objects._length; ++j) { + newHash = hashJson(newHash, (TRI_json_t*)(TRI_AtVector(&(data->_value._objects),j)) ); + } + return newHash; + } + else { + return hash; + } + } + } // end of switch statement + assert(false); + return hash; +} // end of function isEqualJsonJson + + +static uint64_t hashShapedJson (const uint64_t hash, const TRI_shaped_json_t* shapedJson) { + return TRI_FnvHashBlock(hash, shapedJson->_data.data, shapedJson->_data.length); +} // end of function hashShapedJson + + +// ............................................................................. +// marks an element in the unique assoc array as being 'cleared' or 'empty' +// ............................................................................. +static void clearElement(struct TRI_associative_array_s* associativeArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + if (element != NULL) { + hElement->data = 0; + } +} + + +// ............................................................................. +// returns true if an element in the unique assoc array is 'empty' +// ............................................................................. +static bool isEmptyElement (struct TRI_associative_array_s* associativeArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + if (element != NULL) { + if (hElement->data == 0) { + return true; + } + } + return false; +} + + +// ............................................................................. +// Determines if two elements of the unique assoc array are equal +// Two elements are 'equal' if the shaped json content is equal. +// ............................................................................. +static bool isEqualElementElement (struct TRI_associative_array_s* associativeArray, + void* leftElement, void* rightElement) { + HashIndexElement* hLeftElement = (HashIndexElement*)(leftElement); + HashIndexElement* hRightElement = (HashIndexElement*)(rightElement); + + if (leftElement == NULL || rightElement == NULL) { + return false; + } + + if (hLeftElement->numFields != hRightElement->numFields) { + return false; // should never happen + } + + for (size_t j = 0; j < hLeftElement->numFields; j++) { + if (!isEqualShapedJsonShapedJson((j + hLeftElement->fields), (j + hRightElement->fields))) { + return false; + } + } + + return true; +} + + +// ............................................................................. +// Determines if two elements of the unique assoc array are equal +// Two elements are 'equal' if the shaped json content is equal. +// ............................................................................. +static bool isEqualKeyElement (struct TRI_associative_array_s* associativeArray, + void* leftElement, void* rightElement) { + HashIndexElement* hLeftElement = (HashIndexElement*)(leftElement); + HashIndexElement* hRightElement = (HashIndexElement*)(rightElement); + + if (leftElement == NULL || rightElement == NULL) { + return false; + } + + if (hLeftElement->numFields != hRightElement->numFields) { + return false; // should never happen + } + + for (size_t j = 0; j < hLeftElement->numFields; j++) { + if (!isEqualShapedJsonShapedJson((j + hLeftElement->fields), (j + hRightElement->fields))) { + return false; + } + } + + return true; +} + + +// ............................................................................. +// The actual hashing occurs here +// ............................................................................. +static uint64_t hashElement (struct TRI_associative_array_s* associativeArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + uint64_t hash = TRI_FnvHashBlockInitial(); + for (size_t j = 0; j < hElement->numFields; j++) { + hash = hashShapedJson(hash, (j + hElement->fields) ); + } + return hash; +} + + +static uint64_t hashKey (struct TRI_associative_array_s* associativeArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + uint64_t hash = TRI_FnvHashBlockInitial(); + for (size_t j = 0; j < hElement->numFields; j++) { + hash = hashShapedJson(hash, (j + hElement->fields) ); + } + return hash; +} + + + + +// ............................................................................. +// Creates a new associative array +// ............................................................................. + +HashIndex* HashIndex_new() { + HashIndex* hashIndex; + + hashIndex = TRI_Allocate(sizeof(HashIndex)); + if (hashIndex == NULL) { + return NULL; + } + + hashIndex->unique = true; + hashIndex->assocArray.uniqueArray = TRI_Allocate(sizeof(TRI_associative_array_t)); + if (hashIndex->assocArray.uniqueArray == NULL) { + TRI_Free(hashIndex); + return NULL; + } + + TRI_InitAssociativeArray(hashIndex->assocArray.uniqueArray, + sizeof(HashIndexElement), + hashKey, + hashElement, + clearElement, + isEmptyElement, + isEqualKeyElement, + isEqualElementElement); + + return hashIndex; +} + + +// ............................................................................... +// Adds (inserts) a data element into the associative array (hash index) +// ............................................................................... + +int HashIndex_add(HashIndex* hashIndex, HashIndexElement* element) { + bool result; + result = TRI_InsertElementAssociativeArray(hashIndex->assocArray.uniqueArray, element, false); + if (result) { + return 0; + } + return -1; +} + + +// ............................................................................... +// Locates an entry within the unique associative array +// ............................................................................... + +HashIndexElements* HashIndex_find(HashIndex* hashIndex, HashIndexElement* element) { + HashIndexElement* result; + HashIndexElements* results; + + results = TRI_Allocate(sizeof(HashIndexElements)); + + result = (HashIndexElement*) (TRI_FindByElementAssociativeArray(hashIndex->assocArray.uniqueArray, element)); + + if (result != NULL) { + results->_elements = TRI_Allocate(sizeof(HashIndexElement) * 1); // unique hash index maximum number is 1 + results->_elements[0] = *result; + results->_numElements = 1; + } + else { + results->_elements = NULL; + results->_numElements = 0; + } + return results; +} + + +// ............................................................................... +// An alias for addIndex +// ............................................................................... + +int HashIndex_insert(HashIndex* hashIndex, HashIndexElement* element) { + return HashIndex_add(hashIndex,element); +} + + +// ............................................................................... +// Removes an entry from the associative array +// ............................................................................... + +bool HashIndex_remove(HashIndex* hashIndex, HashIndexElement* element) { + bool result; + + result = TRI_RemoveElementAssociativeArray(hashIndex->assocArray.uniqueArray, element, NULL); + return result; +} + + +// ............................................................................... +// updates and entry from the associative array, first removes beforeElement, +// then adds the afterElement +// ............................................................................... + +bool HashIndex_update(HashIndex* hashIndex, const HashIndexElement* beforeElement, + const HashIndexElement* afterElement) { + assert(false); + return false; +} + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// Multi-hash non-unique hash indexes +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +// Private methods +//------------------------------------------------------------------------------ + + +// ............................................................................. +// Marks an entry in the non-unique associative array as being 'cleared'. +// ............................................................................. +static void multiClearElement(struct TRI_multi_array_s* multiArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + if (element != NULL) { + hElement->data = 0; + } +} + + +// ............................................................................. +// Determines if an entry in the associative array is marked as being empty (cleared) +// ............................................................................. +static bool isMultiEmptyElement (struct TRI_multi_array_s* multiArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + if (element != NULL) { + if (hElement->data == 0) { + return true; + } + } + return false; +} + + +// ............................................................................. +// Returns true if document pointers are the same, otherwise returns false +// ............................................................................. +static bool isMultiEqualElementElement (struct TRI_multi_array_s* multiArray, + void* leftElement, void* rightElement) { + HashIndexElement* hLeftElement = (HashIndexElement*)(leftElement); + HashIndexElement* hRightElement = (HashIndexElement*)(rightElement); + int result; + + if (leftElement == NULL || rightElement == NULL) { + return false; + } + + return (hLeftElement->data == hRightElement->data); +} + + +// ............................................................................. +// Returns true if the "key" matches that of the element +// ............................................................................. +static bool isMultiEqualKeyElement (struct TRI_multi_array_s* multiArray, + void* leftElement, void* rightElement) { + HashIndexElement* hLeftElement = (HashIndexElement*)(leftElement); + HashIndexElement* hRightElement = (HashIndexElement*)(rightElement); + int result; + + if (leftElement == NULL || rightElement == NULL) { + return false; + } + + if (hLeftElement->numFields != hRightElement->numFields) { + return false; // should never happen + } + + for (size_t j = 0; j < hLeftElement->numFields; j++) { + TRI_shaped_json_t* left = (j + hLeftElement->fields); + TRI_shaped_json_t* right = (j + hRightElement->fields); + if (!isEqualShapedJsonShapedJson(left, right)) { + return false; + } + } + + return true; +} + + +// ............................................................................. +// The actual hashing occurs here +// ............................................................................. +static uint64_t multiHashElement (struct TRI_multi_array_s* multiArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + uint64_t hash = TRI_FnvHashBlockInitial(); + for (size_t j = 0; j < hElement->numFields; j++) { + hash = hashShapedJson(hash, (j + hElement->fields) ); + //printf("%s:%u:%u:%f\n",__FILE__,__LINE__,hash, *((double*)((j + hElement->fields)->_data.data))); + } + return hash; +} + + +static uint64_t multiHashKey (struct TRI_multi_array_s* multiArray, void* element) { + HashIndexElement* hElement = (HashIndexElement*)(element); + uint64_t hash = TRI_FnvHashBlockInitial(); + for (size_t j = 0; j < hElement->numFields; j++) { + hash = hashShapedJson(hash, (j + hElement->fields) ); + //printf("%s:%u:%u:%f\n",__FILE__,__LINE__,hash, *((double*)((j + hElement->fields)->_data.data))); + } + return hash; +} + + + + +// ............................................................................. +// Creates a new multi associative array +// ............................................................................. + +HashIndex* MultiHashIndex_new() { + HashIndex* hashIndex; + + hashIndex = TRI_Allocate(sizeof(HashIndex)); + if (hashIndex == NULL) { + return NULL; + } + + hashIndex->unique = false; + hashIndex->assocArray.nonUniqueArray = TRI_Allocate(sizeof(TRI_multi_array_t)); + if (hashIndex->assocArray.nonUniqueArray == NULL) { + TRI_Free(hashIndex); + return NULL; + } + + TRI_InitMultiArray(hashIndex->assocArray.nonUniqueArray, + sizeof(HashIndexElement), + multiHashKey, + multiHashElement, + multiClearElement, + isMultiEmptyElement, + isMultiEqualKeyElement, + isMultiEqualElementElement); + + return hashIndex; +} + + + + +// ............................................................................... +// Adds (inserts) a data element into the associative array (hash index) +// ............................................................................... + +int MultiHashIndex_add(HashIndex* hashIndex, HashIndexElement* element) { + bool result; + result = TRI_InsertElementMultiArray(hashIndex->assocArray.nonUniqueArray, element, false); + if (result) { + return 0; + } + return -1; +} + + +// ............................................................................... +// Locates an entry within the associative array +// ............................................................................... + +HashIndexElements* MultiHashIndex_find(HashIndex* hashIndex, HashIndexElement* element) { + TRI_vector_pointer_t result; + HashIndexElements* results; + size_t j; + + results = TRI_Allocate(sizeof(HashIndexElements)); + + // ............................................................................. + // We can only use the LookupByKey method for non-unique hash indexes, since + // we want more than one result returned! + // ............................................................................. + result = TRI_LookupByKeyMultiArray (hashIndex->assocArray.nonUniqueArray, element); + + + if (result._length == 0) { + results->_elements = NULL; + results->_numElements = 0; + } + else { + results->_numElements = result._length; + results->_elements = TRI_Allocate(sizeof(HashIndexElement) * result._length); + for (j = 0; j < result._length; ++j) { + results->_elements[j] = *((HashIndexElement*)(result._buffer[j])); + } + } + TRI_DestroyVectorPointer(&result); + return results; +} + + +// ............................................................................... +// An alias for addIndex +// ............................................................................... + +int MultiHashIndex_insert(HashIndex* hashIndex, HashIndexElement* element) { + return MultiHashIndex_add(hashIndex,element); +} + + +// ............................................................................... +// Removes an entry from the associative array +// ............................................................................... + +bool MultiHashIndex_remove(HashIndex* hashIndex, HashIndexElement* element) { + bool result; + result = TRI_RemoveElementMultiArray(hashIndex->assocArray.nonUniqueArray, element, NULL); + return result; +} + + +// ............................................................................... +// updates and entry from the associative array, first removes beforeElement, +// then adds the afterElement +// ............................................................................... + +bool MultiHashIndex_update(HashIndex* hashIndex, HashIndexElement* beforeElement, + HashIndexElement* afterElement) { + assert(false); + return false; +} diff --git a/HashIndex/hashindex.h b/HashIndex/hashindex.h new file mode 100755 index 0000000000..f06d053811 --- /dev/null +++ b/HashIndex/hashindex.h @@ -0,0 +1,107 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief unique hash index +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright by triAGENS GmbH - All rights reserved. +/// +/// The Programs (which include both the software and documentation) +/// contain proprietary information of triAGENS GmbH; they are +/// provided under a license agreement containing restrictions on use and +/// disclosure and are also protected by copyright, patent and other +/// intellectual and industrial property laws. Reverse engineering, +/// disassembly or decompilation of the Programs, except to the extent +/// required to obtain interoperability with other independently created +/// software or as specified by law, is prohibited. +/// +/// The Programs are not intended for use in any nuclear, aviation, mass +/// transit, medical, or other inherently dangerous applications. It shall +/// be the licensee's responsibility to take all appropriate fail-safe, +/// backup, redundancy, and other measures to ensure the safe use of such +/// applications if the Programs are used for such purposes, and triAGENS +/// GmbH disclaims liability for any damages caused by such use of +/// the Programs. +/// +/// This software is the confidential and proprietary information of +/// triAGENS GmbH. You shall not disclose such confidential and +/// proprietary information and shall use it only in accordance with the +/// terms of the license agreement you entered into with triAGENS GmbH. +/// +/// Copyright holder is triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. O +/// @author Copyright 2011, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include "ShapedJson/shaped-json.h" + +// ............................................................................... +// Define the structure of a unique or non-unique hashindex +// ............................................................................... + +typedef struct { + union { + TRI_associative_array_t* uniqueArray; + TRI_multi_array_t* nonUniqueArray; + } assocArray; + bool unique; +} HashIndex; + + +typedef struct { + size_t numFields; // the number of fields + TRI_shaped_json_t* fields; // list of shaped json objects the blob of data within will be hashed + void* data; // master document pointer +} HashIndexElement; + +typedef struct { + size_t _numElements; + HashIndexElement* _elements; // simple list of elements +} HashIndexElements; + + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// Unique hash indexes +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ + + + +HashIndex* HashIndex_new (void); + +int HashIndex_add (HashIndex*, HashIndexElement*); + +HashIndexElements* HashIndex_find (HashIndex*, HashIndexElement*); + +int HashIndex_insert (HashIndex*, HashIndexElement*); + +bool HashIndex_remove (HashIndex*, HashIndexElement*); + +bool HashIndex_update (HashIndex*, const HashIndexElement*, const HashIndexElement*); + + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// Multi-hash non-unique hash indexes +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ + + +HashIndex* MultiHashIndex_new (void); + +int MultiHashIndex_add (HashIndex*, HashIndexElement*); + +HashIndexElements* MultiHashIndex_find (HashIndex*, HashIndexElement*); + +int MultiHashIndex_insert (HashIndex*, HashIndexElement*); + +bool MultiHashIndex_remove (HashIndex*, HashIndexElement*); + +bool MultiHashIndex_update (HashIndex*, HashIndexElement*, HashIndexElement*); diff --git a/HttpServer/HttpCommTask.cpp b/HttpServer/HttpCommTask.cpp index af16850ff2..6660886eaa 100644 --- a/HttpServer/HttpCommTask.cpp +++ b/HttpServer/HttpCommTask.cpp @@ -111,10 +111,11 @@ namespace triagens { switch (request->requestType()) { case HttpRequest::HTTP_REQUEST_GET: case HttpRequest::HTTP_REQUEST_DELETE: + case HttpRequest::HTTP_REQUEST_HEAD: bodyLength = request->contentLength(); if (bodyLength > 0) { - LOGGER_DEBUG << "received http GET/DELETE request with body length, this should not happen"; + LOGGER_DEBUG << "received http GET/DELETE/HEAD request with body length, this should not happen"; readRequestBody = true; } else { diff --git a/HttpServer/HttpHandlerFactory.cpp b/HttpServer/HttpHandlerFactory.cpp index ab89c8a31d..d95f93f530 100644 --- a/HttpServer/HttpHandlerFactory.cpp +++ b/HttpServer/HttpHandlerFactory.cpp @@ -144,7 +144,31 @@ namespace triagens { } } - if (! prefix.empty()) { + if (prefix.empty()) { + LOGGER_TRACE << "no prefix handler found, trying catch all"; + + i = ii.find("/"); + if (i != ii.end()) { + LOGGER_TRACE << "found catch all handler '/'"; + + size_t l = 1; + size_t n = path.find_first_of('/', l); + + while (n != string::npos) { + request->addSuffix(path.substr(l, n - l)); + l = n + 1; + n = path.find_first_of('/', l); + } + + if (l < path.size()) { + request->addSuffix(path.substr(l)); + } + prefix = "/"; + request->setRequestPath(prefix); + } + } + + else { LOGGER_TRACE << "found prefix match '" << prefix << "'"; size_t l = prefix.size() + 1; diff --git a/Installation/MacOSX/MacPorts/Portfile b/Installation/MacOSX/MacPorts/Portfile new file mode 100644 index 0000000000..b2fdf1c201 --- /dev/null +++ b/Installation/MacOSX/MacPorts/Portfile @@ -0,0 +1,137 @@ +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 +# $Id$ + +PortSystem 1.0 + +name AvocadoDB +version 0.1.2 +categories databases +platforms darwin +license Apache License, version 2.0 +maintainers triagens.de:f.celler + +description a NoSQL document store that grows with your project + +long_description Our mission: projects are different, project requirements \ + change. We want to offer with AvocadoDB a most universally \ + applicable nosql database which can be used in a maximum \ + number of different use cases. In buzzword bingo language: \ + we want to become the MySql in nosql – without MySql’s \ + annoyances of course. \ + (See the WWW page for details.) + +supported_archs i386 x86_64 + +homepage http://www.avocadodb.org + +fetch.type git +git.url https://github.com/triAGENS/AvocadoDB +git.branch v0.1.2 + +depends_build port:bison \ + port:flex + +configure.args --enable-all-in-one \ + --enable-bison \ + --enable-flex \ + --disable-dbdir + +build.target all + +################################################################################ + +set dbgroup avocado +set dbuser avocado + +set dbdir ${prefix}/var/avocado + +set sbindir ${prefix}/sbin + +set etcbase ${prefix}/etc/voc +set etcdir ${etcbase}/avocado + +set logbase ${prefix}/var/log/voc +set logdir ${logbase}/avocado + +################################################################################ + +post-destroot { + addgroup ${dbgroup} + adduser ${dbuser} gid=[existsgroup ${dbgroup}] + + xinstall -d -m 1777 \ + ${destroot}${etcbase} + + xinstall -d -m 755 -o ${dbuser} -g ${dbgroup} \ + ${destroot}${etcdir} + + xinstall -m 644 -o ${dbuser} -g ${dbgroup} \ + ${worksrcpath}/Installation/MacOSX/MacPorts/avocado.conf \ + ${destroot}${prefix}/etc/voc/avocado.conf.sample + + xinstall -d -m 1777 \ + ${destroot}${logbase} + + xinstall -d -m 755 -o ${dbuser} -g ${dbgroup} \ + ${destroot}${logdir} + + xinstall -d -m 755 -o ${dbuser} -g ${dbgroup} \ + ${destroot}${dbdir} + + xinstall -d -m 755 \ + ${destroot}${prefix}/Library/LaunchDaemons + + xinstall -m 644 \ + ${worksrcpath}/Installation/MacOSX/MacPorts/org.avocadodb.plist \ + ${destroot}${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample + + destroot.keepdirs-append \ + ${destroot}${logdir} \ + ${destroot}${dbdir} + + reinplace "s|/usr/sbin|${sbindir}/|g" ${destroot}${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample + reinplace "s|/etc|${etcdir}|g" ${destroot}${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample + + reinplace "s|/var/log|${logdir}|g" ${destroot}${prefix}/etc/voc/avocado.conf.sample +} + +################################################################################ + +post-activate { + if {![file exists ${prefix}/Library/LaunchDaemons/org.avocadodb.plist]} { + file copy ${prefix}/Library/LaunchDaemons/org.avocadodb.plist.sample \ + ${prefix}/Library/LaunchDaemons/org.avocadodb.plist + } + + if {![file exists ${prefix}/etc/voc/avocado.conf]} { + file copy ${prefix}/etc/voc/avocado.conf.sample \ + ${prefix}/etc/voc/avocado.conf + } +} + +################################################################################ + +notes " +To start up the AvocadoDB server instance, use + + sudo launchctl load ${prefix}/Library/LaunchDaemons/org.avocadodb.plist + +The server will response on port 8529 to client request and you can use + + http://localhost:8530/ + +to access the administration interface. + +To stop up the AvocadoDB server instance, use + + sudo launchctl unload ${prefix}/Library/LaunchDaemons/org.avocadodb.plist + +Please note that this is a very early version if AvocadoDB. There will be +bugs and we'd realy appreciate it if you report them: + + https://github.com/triAGENS/AvocadoDB/issues + +You find the configuration file at + + ${prefix}/etc/voc/avocado.conf +" diff --git a/Installation/MacOSX/MacPorts/avocado.conf b/Installation/MacOSX/MacPorts/avocado.conf new file mode 100644 index 0000000000..fb93bcf0d5 --- /dev/null +++ b/Installation/MacOSX/MacPorts/avocado.conf @@ -0,0 +1,11 @@ +[server] +http-port = localhost:8529 +admin-port = localhost:8530 + +[action] +threads = 4 + +[log] +level = info +severity = human +file = /var/log/voc/avocado.log diff --git a/Installation/MacOSX/MacPorts/org.avocadodb.plist b/Installation/MacOSX/MacPorts/org.avocadodb.plist new file mode 100644 index 0000000000..c4045209e3 --- /dev/null +++ b/Installation/MacOSX/MacPorts/org.avocadodb.plist @@ -0,0 +1,27 @@ + + + + + Disabled + + + Label + org.avocadodb + + ProgramArguments + + /usr/sbin/avocado + -c + /etc/voc/avocado.conf + + + UserName + avocado + + GroupName + avocado + + RunAtLoad + + + diff --git a/JsonParserX/InputParser.h b/JsonParserX/InputParser.h index d1ea94aa0a..ffec2bece5 100644 --- a/JsonParserX/InputParser.h +++ b/JsonParserX/InputParser.h @@ -46,7 +46,7 @@ namespace triagens { class HttpRequest; namespace InputParser { - class ObjectDescriptionImpl; + struct ObjectDescriptionImpl; //////////////////////////////////////////////////////////////////////////////// /// @ingroup Utilities diff --git a/JsonParserX/JsonScannerX.cpp b/JsonParserX/JsonScannerX.cpp index 9fe3ccae6f..d751823fd0 100644 --- a/JsonParserX/JsonScannerX.cpp +++ b/JsonParserX/JsonScannerX.cpp @@ -838,6 +838,7 @@ static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif +#define YY_NO_INPUT #ifndef YY_NO_INPUT /* %if-c-only Standard (non-C++) definition */ /* %not-for-header */ diff --git a/JsonParserX/position.hh b/JsonParserX/position.hh index e458c1eba9..8ab7d9189e 100644 --- a/JsonParserX/position.hh +++ b/JsonParserX/position.hh @@ -128,7 +128,7 @@ namespace triagens { namespace json_parser { { return (pos1.filename == pos2.filename - || pos1.filename && pos2.filename && *pos1.filename == *pos2.filename) + || (pos1.filename && pos2.filename && *pos1.filename == *pos2.filename)) && pos1.line == pos2.line && pos1.column == pos2.column; } diff --git a/Makefile.all-in-one b/Makefile.all-in-one index c5d77bd4a7..8a676f7b0d 100644 --- a/Makefile.all-in-one +++ b/Makefile.all-in-one @@ -4,17 +4,38 @@ ## LIBEV ################################################################################ +if ENABLE_64BIT +LIBEV_BUILD_VERSION=ARCH.x64 +endif + +if ENABLE_32BIT +LIBEV_BUILD_VERSION=ARCH.ia32 +endif + +if ENABLE_FORCE_32BIT +LIBEV_CFLAGS_32=-m32 -O2 -g +LIBEV_LDFLAGS_32=-m32 +else +LIBEV_CFLAGS_32=-O2 -g +LIBEV_LDFLAGS_32= +endif + BUILT_SOURCES += @LIBEV_LIBS@ -@LIBEV_LIBS@: +@LIBEV_LIBS@: .libev-build + +.libev-build: @echo @echo "--------------------------------------------------------------------------------" @echo "BUILDING LIBEV" @echo "--------------------------------------------------------------------------------" @echo - cd @top_srcdir@/3rdParty/libev && ./configure --disable-shared - cd @top_srcdir@/3rdParty/libev && make + mkdir @top_srcdir@/3rdParty/libev/$(LIBEV_BUILD_VERSION) || true + cd @top_srcdir@/3rdParty/libev/$(LIBEV_BUILD_VERSION) && CFLAGS="$(LIBEV_CFLAGS_32)" orig_CFLAGS="$(LIBEV_CFLAGS_32)" LDFLAGS="$(LIBEV_LDFLAGS_32)" ../configure --disable-shared + cd @top_srcdir@/3rdParty/libev/$(LIBEV_BUILD_VERSION) && make + + touch .libev-build @echo @echo "--------------------------------------------------------------------------------" @@ -34,9 +55,11 @@ if ENABLE_32BIT V8_BUILD_VERSION=ia32 endif -BUILT_SOURCES += $(V8_LIBS) +BUILT_SOURCES += @V8_LIBS@ -$(V8_LIBS): +@V8_LIBS@: .v8-build + +.v8-build: @echo @echo "--------------------------------------------------------------------------------" @echo "BUILDING V8" @@ -45,10 +68,13 @@ $(V8_LIBS): if ENABLE_DARWIN cd @top_srcdir@/3rdParty/V8 && scons snapshot=off library=static mode=release arch=$(V8_BUILD_VERSION) + cd @top_srcdir@/3rdParty/V8 && mv libv8.a libv8_$(V8_BUILD_VERSION).a else cd @top_srcdir@/3rdParty/V8 && make library=static snapshot=off $(V8_BUILD_VERSION).release endif + touch .v8-build + @echo @echo "--------------------------------------------------------------------------------" @echo "BUILD V8 FINISHED" diff --git a/Makefile.am b/Makefile.am index a6d631dd39..f07ba9b0c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,15 +1,39 @@ ACLOCAL_AMFLAGS = -I m4 -AM_CFLAGS = -AM_CXXFLAGS = -AM_CPPFLAGS = -D_SYSCONFDIR_='"${sysconfdir}"' -D_PKGDATADIR_='"${pkgdatadir}"' -D_DATABASEDIR_='"${localstatedir}/${PACKAGE_TARNAME}"' -AM_LDFLAGS = +AM_CPPFLAGS = \ + -D_SYSCONFDIR_='"${sysconfdir}"' \ + -D_PKGDATADIR_='"${pkgdatadir}"' \ + -D_DATABASEDIR_='"${localstatedir}/${PACKAGE_TARNAME}"' \ + @BOOST_CPPFLAGS@ \ + @LIBEV_CPPFLAGS@ \ + @MATH_CPPFLAGS@ \ + @NCURSES_CPPFLAGS@ \ + @OPENSSL_CPPFLAGS@ \ + @READLINE_CPPFLAGS@ \ + @V8_CPPFLAGS@ + +AM_LDFLAGS = \ + @BOOST_LDFLAGS@ \ + @LIBEV_LDFLAGS@ \ + @MATH_LDFLAGS@ \ + @NCURSES_LDFLAGS@ \ + @OPENSSL_LDFLAGS@ \ + @READLINE_LDFLAGS@ \ + @V8_LDFLAGS@ + +LIBS = \ + @BOOST_LIBS@ \ + @LIBEV_LIBS@ \ + @MATH_LIBS@ \ + @NCURSES_LIBS@ \ + @OPENSSL_LIBS@ \ + @READLINE_LIBS@ \ + @V8_LIBS@ + BUILT_SOURCES = CLEANUP = -LIBS = -noinst_LIBRARIES = libavocadodb.a -bin_PROGRAMS = avocado +sbin_PROGRAMS = avocado nobase_pkgdata_DATA = \ $(shell find @srcdir@/js/system -name "*.js" -print) \ @@ -21,11 +45,13 @@ nobase_pkgdata_DATA = \ $(shell find @srcdir@/html -name "*.js" -print) \ $(shell find @srcdir@/html -name "*.png" -print) +if ENABLE_INSTALL_DBDIR install-data-local: - test -d @localstatedir@//${PACKAGE_TARNAME} || mkdir -p @localstatedir@//${PACKAGE_TARNAME} + test -d @localstatedir@/${PACKAGE_TARNAME} || mkdir -p @localstatedir@/${PACKAGE_TARNAME} +endif ################################################################################ -## avocado +## avocadodb ################################################################################ include Makefile.files diff --git a/Makefile.doxygen b/Makefile.doxygen index 4529597449..91bd0ade0f 100644 --- a/Makefile.doxygen +++ b/Makefile.doxygen @@ -38,7 +38,7 @@ Doxygen/xml/%.md: Doxygen/xml/%.xml .PHONY: doxygen doxygen: Doxygen/avocado.doxy $(DOXYGEN) - doxygen Doxygen/avocado.doxy + doxygen Doxygen/avocado.doxy > /dev/null ################################################################################ ## wiki @@ -54,6 +54,6 @@ wiki: $(WIKI) ## CLEANUP ################################################################################ -CLEANUP += $(DOXYGEN) $(WIKI) +CLEANUP += $(DOXYGEN) $(WIKI) $(subst Doxygen/xml,Doxygen/wiki,$(WIKI)) diff --git a/Makefile.files b/Makefile.files index 8e28bb7f83..9367f3dd32 100644 --- a/Makefile.files +++ b/Makefile.files @@ -4,17 +4,7 @@ ## avocadodb ################################################################################ -libavocadodb_a_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - @BOOST_CPPFLAGS@ \ - @LIBEV_CPPFLAGS@ \ - @MATH_CPPFLAGS@ \ - @NCURSES_CPPFLAGS@ \ - @OPENSSL_CPPFLAGS@ \ - @READLINE_CPPFLAGS@ \ - @V8_CPPFLAGS@ - -libavocadodb_a_SOURCES = \ +avocado_SOURCES = \ Admin/ApplicationAdminServer.cpp \ Admin/RestAdminBaseHandler.cpp \ Admin/RestAdminFeConfigurationHandler.cpp \ @@ -74,6 +64,7 @@ libavocadodb_a_SOURCES = \ Dispatcher/Job.cpp \ GeneralServer/GeneralFigures.cpp \ GeoIndex/GeoIndex.c \ + HashIndex/hashindex.c \ HttpServer/ApplicationHttpServer.cpp \ HttpServer/ApplicationHttpServerImpl.cpp \ HttpServer/HttpCommTask.cpp \ @@ -98,6 +89,11 @@ libavocadodb_a_SOURCES = \ Logger/LoggerStream.cpp \ Logger/LoggerTiming.cpp \ ProgramOptions/program-options.c \ + QL/ast-query.c \ + QL/formatter.c \ + QL/optimize.c \ + QL/parser.c \ + QL/tokens.c \ Rest/AddressPort.cpp \ Rest/AnyServer.cpp \ Rest/HttpRequest.cpp \ @@ -105,6 +101,16 @@ libavocadodb_a_SOURCES = \ Rest/Initialise.cpp \ Rest/SslInterface.cpp \ Rest/Url.cpp \ + RestHandler/RestActionHandler.cpp \ + RestHandler/RestCollectionHandler.cpp \ + RestHandler/RestSystemActionHandler.cpp \ + RestHandler/RestVocbaseBaseHandler.cpp \ + RestServer/ActionDispatcherThread.cpp \ + RestServer/AvocadoHttpServer.cpp \ + RestServer/AvocadoServer.cpp \ + RestServer/JSLoader.cpp \ + RestServer/SystemActionDispatcherThread.cpp \ + RestServer/avocado.cpp \ ResultGenerator/HtmlResultGenerator.cpp \ ResultGenerator/Initialise.cpp \ ResultGenerator/JsonResultGenerator.cpp \ @@ -127,12 +133,14 @@ libavocadodb_a_SOURCES = \ ShapedJson/json-shaper.c \ ShapedJson/shape-accessor.c \ ShapedJson/shaped-json.c \ + SkipLists/skiplist.c \ + SkipLists/skiplistIndex.c \ V8/v8-actions.cpp \ + V8/v8-conv.cpp \ V8/v8-json.cpp \ + V8/v8-line-editor.cpp \ V8/v8-shell.cpp \ V8/v8-utils.cpp \ - V8/v8-conv.cpp \ - V8/v8-line-editor.cpp \ V8/v8-vocbase.cpp \ Variant/VariantArray.cpp \ Variant/VariantBlob.cpp \ @@ -154,79 +162,30 @@ libavocadodb_a_SOURCES = \ Variant/VariantUInt64.cpp \ Variant/VariantUInt8.cpp \ Variant/VariantVector.cpp \ - VocBase/data-feeder.c \ - VocBase/join-execute.c \ - VocBase/order.c \ + VocBase/barrier.c \ VocBase/blob-collection.c \ VocBase/collection.c \ VocBase/compactor.c \ + VocBase/data-feeder.c \ VocBase/datafile.c \ VocBase/document-collection.c \ - VocBase/fluent-query.c \ - VocBase/select-result.c \ - VocBase/join.c \ - VocBase/query.c \ VocBase/headers.c \ VocBase/index.c \ - VocBase/result-set.c \ + VocBase/join-execute.c \ + VocBase/join.c \ + VocBase/order.c \ + VocBase/query-base.c \ + VocBase/query-error.c \ + VocBase/query-javascript.c \ + VocBase/query-node.c \ + VocBase/query-parse.c \ + VocBase/query.c \ + VocBase/select-result.c \ + VocBase/shadow-data.c \ VocBase/simple-collection.c \ VocBase/synchroniser.c \ VocBase/voc-shaper.c \ - VocBase/vocbase.c \ - QL/ParserWrapper.cpp \ - QL/ast-node.c \ - QL/ast-query.c \ - QL/error.c \ - QL/formatter.c \ - QL/javascripter.c \ - QL/optimize.c \ - QL/parser-context.c \ - QL/parser.c \ - QL/tokens.c - -avocado_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - @BOOST_CPPFLAGS@ \ - @LIBEV_CPPFLAGS@ \ - @MATH_CPPFLAGS@ \ - @NCURSES_CPPFLAGS@ \ - @OPENSSL_CPPFLAGS@ \ - @READLINE_CPPFLAGS@ \ - @V8_CPPFLAGS@ - -avocado_LDFLAGS = \ - -L. \ - @BOOST_LDFLAGS@ \ - @LIBEV_LDFLAGS@ \ - @MATH_LDFLAGS@ \ - @NCURSES_LDFLAGS@ \ - @OPENSSL_LDFLAGS@ \ - @READLINE_LDFLAGS@ \ - @V8_LDFLAGS@ - -avocado_LDADD = \ - -lavocadodb \ - @BOOST_LIBS@ \ - @LIBEV_LIBS@ \ - @MATH_LIBS@ \ - @NCURSES_LIBS@ \ - @OPENSSL_LIBS@ \ - @READLINE_LIBS@ \ - @V8_LIBS@ - -avocado_DEPENDENCIES = @builddir@/libavocadodb.a - -avocado_SOURCES = \ - RestHandler/RestActionHandler.cpp \ - RestHandler/RestDocumentHandler.cpp \ - RestHandler/RestSystemActionHandler.cpp \ - RestHandler/RestVocbaseBaseHandler.cpp \ - RestServer/ActionDispatcherThread.cpp \ - RestServer/AvocadoHttpServer.cpp \ - RestServer/AvocadoServer.cpp \ - RestServer/JSLoader.cpp \ - RestServer/SystemActionDispatcherThread.cpp \ - RestServer/avocado.cpp + VocBase/vocbase.c ################################################################################ ## JavaScript source code as header @@ -241,7 +200,6 @@ JAVASCRIPT_HEADER = \ js/server/js-json.h \ js/server/js-shell.h - BUILT_SOURCES += $(JAVASCRIPT_HEADER) ################################################################################ @@ -291,6 +249,7 @@ DOXYGEN = \ Doxygen/js/bootstrap/print.c \ Doxygen/js/modules/graph.c \ Doxygen/js/modules/jsunity.c \ + Doxygen/js/modules/simple-query.c \ Doxygen/js/server/modules.c \ Doxygen/js/server/actions.c \ Doxygen/js/server/json.c \ @@ -324,11 +283,10 @@ WIKI = \ Doxygen/xml/JSModules.md \ Doxygen/xml/JavaScriptFunc.md \ Doxygen/xml/JavaScriptFuncIndex.md \ - Doxygen/xml/Pagination.md \ Doxygen/xml/RefManual.md \ Doxygen/xml/RestDocument.md \ - Doxygen/xml/RestInterface.md \ Doxygen/xml/RestSystem.md \ + Doxygen/xml/SimpleQueries.md \ Doxygen/xml/StartStop.md \ Doxygen/xml/UserManual.md \ Doxygen/xml/jsUnity.md diff --git a/Makefile.in b/Makefile.in index 63abdbc18c..f2e2f6c1a1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -46,7 +46,6 @@ ################################################################################ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -67,7 +66,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -bin_PROGRAMS = avocado$(EXEEXT) +sbin_PROGRAMS = avocado$(EXEEXT) DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.all-in-one \ $(srcdir)/Makefile.am $(srcdir)/Makefile.bison \ $(srcdir)/Makefile.doxygen $(srcdir)/Makefile.files \ @@ -86,7 +85,7 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.all-in-one \ ################################################################################ ################################################################################ @ENABLE_BISON_TRUE@am__append_2 = $(BISON_FILES) $(BISONXX_FILES) -@ENABLE_ALL_IN_ONE_TRUE@am__append_3 = @LIBEV_LIBS@ $(V8_LIBS) +@ENABLE_ALL_IN_ONE_TRUE@am__append_3 = @LIBEV_LIBS@ @V8_LIBS@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ @@ -119,215 +118,151 @@ CONFIG_HEADER = $(top_builddir)/config/config.h \ $(top_builddir)/BasicsC/local-configuration.h CONFIG_CLEAN_FILES = Doxygen/avocado.doxy CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru -AM_V_AR = $(am__v_AR_$(V)) -am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) -am__v_AR_0 = @echo " AR " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -libavocadodb_a_AR = $(AR) $(ARFLAGS) -libavocadodb_a_LIBADD = +am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgdatadir)" +PROGRAMS = $(sbin_PROGRAMS) am__dirstamp = $(am__leading_dot)dirstamp -am_libavocadodb_a_OBJECTS = \ - Admin/libavocadodb_a-ApplicationAdminServer.$(OBJEXT) \ - Admin/libavocadodb_a-RestAdminBaseHandler.$(OBJEXT) \ - Admin/libavocadodb_a-RestAdminFeConfigurationHandler.$(OBJEXT) \ - Admin/libavocadodb_a-RestAdminLogHandler.$(OBJEXT) \ - Admin/libavocadodb_a-RestBaseHandler.$(OBJEXT) \ - Admin/libavocadodb_a-RestVersionHandler.$(OBJEXT) \ - ApplicationServer/libavocadodb_a-ApplicationServer.$(OBJEXT) \ - ApplicationServer/libavocadodb_a-ApplicationServerImpl.$(OBJEXT) \ - ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.$(OBJEXT) \ - Basics/libavocadodb_a-ConditionLocker.$(OBJEXT) \ - Basics/libavocadodb_a-ConditionVariable.$(OBJEXT) \ - Basics/libavocadodb_a-FileUtils.$(OBJEXT) \ - Basics/libavocadodb_a-Initialise.$(OBJEXT) \ - Basics/libavocadodb_a-LibraryLoader.$(OBJEXT) \ - Basics/libavocadodb_a-Mutex.$(OBJEXT) \ - Basics/libavocadodb_a-MutexLocker.$(OBJEXT) \ - Basics/libavocadodb_a-ProgramOptions.$(OBJEXT) \ - Basics/libavocadodb_a-ProgramOptionsDescription.$(OBJEXT) \ - Basics/libavocadodb_a-Random.$(OBJEXT) \ - Basics/libavocadodb_a-ReadLocker.$(OBJEXT) \ - Basics/libavocadodb_a-ReadUnlocker.$(OBJEXT) \ - Basics/libavocadodb_a-ReadWriteLock.$(OBJEXT) \ - Basics/libavocadodb_a-StringUtils.$(OBJEXT) \ - Basics/libavocadodb_a-Thread.$(OBJEXT) \ - Basics/libavocadodb_a-Timing.$(OBJEXT) \ - Basics/libavocadodb_a-WriteLocker.$(OBJEXT) \ - Basics/libavocadodb_a-WriteUnlocker.$(OBJEXT) \ - BasicsC/libavocadodb_a-associative-multi.$(OBJEXT) \ - BasicsC/libavocadodb_a-associative.$(OBJEXT) \ - BasicsC/libavocadodb_a-conversions.$(OBJEXT) \ - BasicsC/libavocadodb_a-csv.$(OBJEXT) \ - BasicsC/libavocadodb_a-error.$(OBJEXT) \ - BasicsC/libavocadodb_a-files.$(OBJEXT) \ - BasicsC/libavocadodb_a-hashes.$(OBJEXT) \ - BasicsC/libavocadodb_a-init.$(OBJEXT) \ - BasicsC/libavocadodb_a-json.$(OBJEXT) \ - BasicsC/libavocadodb_a-locks-macos.$(OBJEXT) \ - BasicsC/libavocadodb_a-locks-posix.$(OBJEXT) \ - BasicsC/libavocadodb_a-logging.$(OBJEXT) \ - BasicsC/libavocadodb_a-memory.$(OBJEXT) \ - BasicsC/libavocadodb_a-process-utils.$(OBJEXT) \ - BasicsC/libavocadodb_a-random.$(OBJEXT) \ - BasicsC/libavocadodb_a-socket-utils.$(OBJEXT) \ - BasicsC/libavocadodb_a-string-buffer.$(OBJEXT) \ - BasicsC/libavocadodb_a-strings.$(OBJEXT) \ - BasicsC/libavocadodb_a-structures.$(OBJEXT) \ - BasicsC/libavocadodb_a-system-functions.$(OBJEXT) \ - BasicsC/libavocadodb_a-terminal-utils-ncurses.$(OBJEXT) \ - BasicsC/libavocadodb_a-terminal-utils.$(OBJEXT) \ - BasicsC/libavocadodb_a-threads-posix.$(OBJEXT) \ - BasicsC/libavocadodb_a-vector.$(OBJEXT) \ - Dispatcher/libavocadodb_a-ApplicationServerDispatcher.$(OBJEXT) \ - Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.$(OBJEXT) \ - Dispatcher/libavocadodb_a-DispatcherImpl.$(OBJEXT) \ - Dispatcher/libavocadodb_a-DispatcherQueue.$(OBJEXT) \ - Dispatcher/libavocadodb_a-DispatcherThread.$(OBJEXT) \ - Dispatcher/libavocadodb_a-Job.$(OBJEXT) \ - GeneralServer/libavocadodb_a-GeneralFigures.$(OBJEXT) \ - GeoIndex/libavocadodb_a-GeoIndex.$(OBJEXT) \ - HttpServer/libavocadodb_a-ApplicationHttpServer.$(OBJEXT) \ - HttpServer/libavocadodb_a-ApplicationHttpServerImpl.$(OBJEXT) \ - HttpServer/libavocadodb_a-HttpCommTask.$(OBJEXT) \ - HttpServer/libavocadodb_a-HttpHandler.$(OBJEXT) \ - HttpServer/libavocadodb_a-HttpHandlerFactory.$(OBJEXT) \ - HttpServer/libavocadodb_a-PathHandler.$(OBJEXT) \ - HttpServer/libavocadodb_a-RedirectHandler.$(OBJEXT) \ - HttpServer/libavocadodb_a-ServiceUnavailableHandler.$(OBJEXT) \ - HttpsServer/libavocadodb_a-ApplicationHttpsServer.$(OBJEXT) \ - HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.$(OBJEXT) \ - HttpsServer/libavocadodb_a-HttpsAsyncCommTask.$(OBJEXT) \ - HttpsServer/libavocadodb_a-HttpsServer.$(OBJEXT) \ - HttpsServer/libavocadodb_a-HttpsServerImpl.$(OBJEXT) \ - JsonParser/libavocadodb_a-json-parser.$(OBJEXT) \ - JsonParserX/libavocadodb_a-InputParser.$(OBJEXT) \ - JsonParserX/libavocadodb_a-JsonParserX.$(OBJEXT) \ - JsonParserX/libavocadodb_a-JsonParserXDriver.$(OBJEXT) \ - JsonParserX/libavocadodb_a-JsonScannerX.$(OBJEXT) \ - Logger/libavocadodb_a-Logger.$(OBJEXT) \ - Logger/libavocadodb_a-LoggerData.$(OBJEXT) \ - Logger/libavocadodb_a-LoggerInfo.$(OBJEXT) \ - Logger/libavocadodb_a-LoggerStream.$(OBJEXT) \ - Logger/libavocadodb_a-LoggerTiming.$(OBJEXT) \ - ProgramOptions/libavocadodb_a-program-options.$(OBJEXT) \ - Rest/libavocadodb_a-AddressPort.$(OBJEXT) \ - Rest/libavocadodb_a-AnyServer.$(OBJEXT) \ - Rest/libavocadodb_a-HttpRequest.$(OBJEXT) \ - Rest/libavocadodb_a-HttpResponse.$(OBJEXT) \ - Rest/libavocadodb_a-Initialise.$(OBJEXT) \ - Rest/libavocadodb_a-SslInterface.$(OBJEXT) \ - Rest/libavocadodb_a-Url.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-HtmlResultGenerator.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-Initialise.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-JsonResultGenerator.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-JsonXResultGenerator.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-OutputGenerator.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-PhpResultGenerator.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-ResultGenerator.$(OBJEXT) \ - ResultGenerator/libavocadodb_a-XmlResultGenerator.$(OBJEXT) \ - Scheduler/libavocadodb_a-AsyncTask.$(OBJEXT) \ - Scheduler/libavocadodb_a-ConnectionTask.$(OBJEXT) \ - Scheduler/libavocadodb_a-ListenTask.$(OBJEXT) \ - Scheduler/libavocadodb_a-PeriodicTask.$(OBJEXT) \ - Scheduler/libavocadodb_a-Scheduler.$(OBJEXT) \ - Scheduler/libavocadodb_a-SchedulerLibev.$(OBJEXT) \ - Scheduler/libavocadodb_a-SchedulerThread.$(OBJEXT) \ - Scheduler/libavocadodb_a-SignalTask.$(OBJEXT) \ - Scheduler/libavocadodb_a-SocketTask.$(OBJEXT) \ - Scheduler/libavocadodb_a-Task.$(OBJEXT) \ - Scheduler/libavocadodb_a-TimerTask.$(OBJEXT) \ - ShapedJson/libavocadodb_a-json-shaper.$(OBJEXT) \ - ShapedJson/libavocadodb_a-shape-accessor.$(OBJEXT) \ - ShapedJson/libavocadodb_a-shaped-json.$(OBJEXT) \ - V8/libavocadodb_a-v8-actions.$(OBJEXT) \ - V8/libavocadodb_a-v8-json.$(OBJEXT) \ - V8/libavocadodb_a-v8-shell.$(OBJEXT) \ - V8/libavocadodb_a-v8-utils.$(OBJEXT) \ - V8/libavocadodb_a-v8-conv.$(OBJEXT) \ - V8/libavocadodb_a-v8-line-editor.$(OBJEXT) \ - V8/libavocadodb_a-v8-vocbase.$(OBJEXT) \ - Variant/libavocadodb_a-VariantArray.$(OBJEXT) \ - Variant/libavocadodb_a-VariantBlob.$(OBJEXT) \ - Variant/libavocadodb_a-VariantBoolean.$(OBJEXT) \ - Variant/libavocadodb_a-VariantDate.$(OBJEXT) \ - Variant/libavocadodb_a-VariantDatetime.$(OBJEXT) \ - Variant/libavocadodb_a-VariantDouble.$(OBJEXT) \ - Variant/libavocadodb_a-VariantFloat.$(OBJEXT) \ - Variant/libavocadodb_a-VariantInt16.$(OBJEXT) \ - Variant/libavocadodb_a-VariantInt32.$(OBJEXT) \ - Variant/libavocadodb_a-VariantInt64.$(OBJEXT) \ - Variant/libavocadodb_a-VariantInt8.$(OBJEXT) \ - Variant/libavocadodb_a-VariantMatrix2.$(OBJEXT) \ - Variant/libavocadodb_a-VariantNull.$(OBJEXT) \ - Variant/libavocadodb_a-VariantObject.$(OBJEXT) \ - Variant/libavocadodb_a-VariantString.$(OBJEXT) \ - Variant/libavocadodb_a-VariantUInt16.$(OBJEXT) \ - Variant/libavocadodb_a-VariantUInt32.$(OBJEXT) \ - Variant/libavocadodb_a-VariantUInt64.$(OBJEXT) \ - Variant/libavocadodb_a-VariantUInt8.$(OBJEXT) \ - Variant/libavocadodb_a-VariantVector.$(OBJEXT) \ - VocBase/libavocadodb_a-data-feeder.$(OBJEXT) \ - VocBase/libavocadodb_a-join-execute.$(OBJEXT) \ - VocBase/libavocadodb_a-order.$(OBJEXT) \ - VocBase/libavocadodb_a-blob-collection.$(OBJEXT) \ - VocBase/libavocadodb_a-collection.$(OBJEXT) \ - VocBase/libavocadodb_a-compactor.$(OBJEXT) \ - VocBase/libavocadodb_a-datafile.$(OBJEXT) \ - VocBase/libavocadodb_a-document-collection.$(OBJEXT) \ - VocBase/libavocadodb_a-fluent-query.$(OBJEXT) \ - VocBase/libavocadodb_a-select-result.$(OBJEXT) \ - VocBase/libavocadodb_a-join.$(OBJEXT) \ - VocBase/libavocadodb_a-query.$(OBJEXT) \ - VocBase/libavocadodb_a-headers.$(OBJEXT) \ - VocBase/libavocadodb_a-index.$(OBJEXT) \ - VocBase/libavocadodb_a-result-set.$(OBJEXT) \ - VocBase/libavocadodb_a-simple-collection.$(OBJEXT) \ - VocBase/libavocadodb_a-synchroniser.$(OBJEXT) \ - VocBase/libavocadodb_a-voc-shaper.$(OBJEXT) \ - VocBase/libavocadodb_a-vocbase.$(OBJEXT) \ - QL/libavocadodb_a-ParserWrapper.$(OBJEXT) \ - QL/libavocadodb_a-ast-node.$(OBJEXT) \ - QL/libavocadodb_a-ast-query.$(OBJEXT) \ - QL/libavocadodb_a-error.$(OBJEXT) \ - QL/libavocadodb_a-formatter.$(OBJEXT) \ - QL/libavocadodb_a-javascripter.$(OBJEXT) \ - QL/libavocadodb_a-optimize.$(OBJEXT) \ - QL/libavocadodb_a-parser-context.$(OBJEXT) \ - QL/libavocadodb_a-parser.$(OBJEXT) \ - QL/libavocadodb_a-tokens.$(OBJEXT) -libavocadodb_a_OBJECTS = $(am_libavocadodb_a_OBJECTS) -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" -PROGRAMS = $(bin_PROGRAMS) -am_avocado_OBJECTS = RestHandler/avocado-RestActionHandler.$(OBJEXT) \ - RestHandler/avocado-RestDocumentHandler.$(OBJEXT) \ - RestHandler/avocado-RestSystemActionHandler.$(OBJEXT) \ - RestHandler/avocado-RestVocbaseBaseHandler.$(OBJEXT) \ - RestServer/avocado-ActionDispatcherThread.$(OBJEXT) \ - RestServer/avocado-AvocadoHttpServer.$(OBJEXT) \ - RestServer/avocado-AvocadoServer.$(OBJEXT) \ - RestServer/avocado-JSLoader.$(OBJEXT) \ - RestServer/avocado-SystemActionDispatcherThread.$(OBJEXT) \ - RestServer/avocado-avocado.$(OBJEXT) +am_avocado_OBJECTS = Admin/ApplicationAdminServer.$(OBJEXT) \ + Admin/RestAdminBaseHandler.$(OBJEXT) \ + Admin/RestAdminFeConfigurationHandler.$(OBJEXT) \ + Admin/RestAdminLogHandler.$(OBJEXT) \ + Admin/RestBaseHandler.$(OBJEXT) \ + Admin/RestVersionHandler.$(OBJEXT) \ + ApplicationServer/ApplicationServer.$(OBJEXT) \ + ApplicationServer/ApplicationServerImpl.$(OBJEXT) \ + ApplicationServer/ApplicationServerSchedulerImpl.$(OBJEXT) \ + Basics/ConditionLocker.$(OBJEXT) \ + Basics/ConditionVariable.$(OBJEXT) Basics/FileUtils.$(OBJEXT) \ + Basics/Initialise.$(OBJEXT) Basics/LibraryLoader.$(OBJEXT) \ + Basics/Mutex.$(OBJEXT) Basics/MutexLocker.$(OBJEXT) \ + Basics/ProgramOptions.$(OBJEXT) \ + Basics/ProgramOptionsDescription.$(OBJEXT) \ + Basics/Random.$(OBJEXT) Basics/ReadLocker.$(OBJEXT) \ + Basics/ReadUnlocker.$(OBJEXT) Basics/ReadWriteLock.$(OBJEXT) \ + Basics/StringUtils.$(OBJEXT) Basics/Thread.$(OBJEXT) \ + Basics/Timing.$(OBJEXT) Basics/WriteLocker.$(OBJEXT) \ + Basics/WriteUnlocker.$(OBJEXT) \ + BasicsC/associative-multi.$(OBJEXT) \ + BasicsC/associative.$(OBJEXT) BasicsC/conversions.$(OBJEXT) \ + BasicsC/csv.$(OBJEXT) BasicsC/error.$(OBJEXT) \ + BasicsC/files.$(OBJEXT) BasicsC/hashes.$(OBJEXT) \ + BasicsC/init.$(OBJEXT) BasicsC/json.$(OBJEXT) \ + BasicsC/locks-macos.$(OBJEXT) BasicsC/locks-posix.$(OBJEXT) \ + BasicsC/logging.$(OBJEXT) BasicsC/memory.$(OBJEXT) \ + BasicsC/process-utils.$(OBJEXT) BasicsC/random.$(OBJEXT) \ + BasicsC/socket-utils.$(OBJEXT) BasicsC/string-buffer.$(OBJEXT) \ + BasicsC/strings.$(OBJEXT) BasicsC/structures.$(OBJEXT) \ + BasicsC/system-functions.$(OBJEXT) \ + BasicsC/terminal-utils-ncurses.$(OBJEXT) \ + BasicsC/terminal-utils.$(OBJEXT) \ + BasicsC/threads-posix.$(OBJEXT) BasicsC/vector.$(OBJEXT) \ + Dispatcher/ApplicationServerDispatcher.$(OBJEXT) \ + Dispatcher/ApplicationServerDispatcherImpl.$(OBJEXT) \ + Dispatcher/DispatcherImpl.$(OBJEXT) \ + Dispatcher/DispatcherQueue.$(OBJEXT) \ + Dispatcher/DispatcherThread.$(OBJEXT) Dispatcher/Job.$(OBJEXT) \ + GeneralServer/GeneralFigures.$(OBJEXT) \ + GeoIndex/GeoIndex.$(OBJEXT) HashIndex/hashindex.$(OBJEXT) \ + HttpServer/ApplicationHttpServer.$(OBJEXT) \ + HttpServer/ApplicationHttpServerImpl.$(OBJEXT) \ + HttpServer/HttpCommTask.$(OBJEXT) \ + HttpServer/HttpHandler.$(OBJEXT) \ + HttpServer/HttpHandlerFactory.$(OBJEXT) \ + HttpServer/PathHandler.$(OBJEXT) \ + HttpServer/RedirectHandler.$(OBJEXT) \ + HttpServer/ServiceUnavailableHandler.$(OBJEXT) \ + HttpsServer/ApplicationHttpsServer.$(OBJEXT) \ + HttpsServer/ApplicationHttpsServerImpl.$(OBJEXT) \ + HttpsServer/HttpsAsyncCommTask.$(OBJEXT) \ + HttpsServer/HttpsServer.$(OBJEXT) \ + HttpsServer/HttpsServerImpl.$(OBJEXT) \ + JsonParser/json-parser.$(OBJEXT) \ + JsonParserX/InputParser.$(OBJEXT) \ + JsonParserX/JsonParserX.$(OBJEXT) \ + JsonParserX/JsonParserXDriver.$(OBJEXT) \ + JsonParserX/JsonScannerX.$(OBJEXT) Logger/Logger.$(OBJEXT) \ + Logger/LoggerData.$(OBJEXT) Logger/LoggerInfo.$(OBJEXT) \ + Logger/LoggerStream.$(OBJEXT) Logger/LoggerTiming.$(OBJEXT) \ + ProgramOptions/program-options.$(OBJEXT) \ + QL/ast-query.$(OBJEXT) QL/formatter.$(OBJEXT) \ + QL/optimize.$(OBJEXT) QL/parser.$(OBJEXT) QL/tokens.$(OBJEXT) \ + Rest/AddressPort.$(OBJEXT) Rest/AnyServer.$(OBJEXT) \ + Rest/HttpRequest.$(OBJEXT) Rest/HttpResponse.$(OBJEXT) \ + Rest/Initialise.$(OBJEXT) Rest/SslInterface.$(OBJEXT) \ + Rest/Url.$(OBJEXT) RestHandler/RestActionHandler.$(OBJEXT) \ + RestHandler/RestCollectionHandler.$(OBJEXT) \ + RestHandler/RestSystemActionHandler.$(OBJEXT) \ + RestHandler/RestVocbaseBaseHandler.$(OBJEXT) \ + RestServer/ActionDispatcherThread.$(OBJEXT) \ + RestServer/AvocadoHttpServer.$(OBJEXT) \ + RestServer/AvocadoServer.$(OBJEXT) \ + RestServer/JSLoader.$(OBJEXT) \ + RestServer/SystemActionDispatcherThread.$(OBJEXT) \ + RestServer/avocado.$(OBJEXT) \ + ResultGenerator/HtmlResultGenerator.$(OBJEXT) \ + ResultGenerator/Initialise.$(OBJEXT) \ + ResultGenerator/JsonResultGenerator.$(OBJEXT) \ + ResultGenerator/JsonXResultGenerator.$(OBJEXT) \ + ResultGenerator/OutputGenerator.$(OBJEXT) \ + ResultGenerator/PhpResultGenerator.$(OBJEXT) \ + ResultGenerator/ResultGenerator.$(OBJEXT) \ + ResultGenerator/XmlResultGenerator.$(OBJEXT) \ + Scheduler/AsyncTask.$(OBJEXT) \ + Scheduler/ConnectionTask.$(OBJEXT) \ + Scheduler/ListenTask.$(OBJEXT) \ + Scheduler/PeriodicTask.$(OBJEXT) Scheduler/Scheduler.$(OBJEXT) \ + Scheduler/SchedulerLibev.$(OBJEXT) \ + Scheduler/SchedulerThread.$(OBJEXT) \ + Scheduler/SignalTask.$(OBJEXT) Scheduler/SocketTask.$(OBJEXT) \ + Scheduler/Task.$(OBJEXT) Scheduler/TimerTask.$(OBJEXT) \ + ShapedJson/json-shaper.$(OBJEXT) \ + ShapedJson/shape-accessor.$(OBJEXT) \ + ShapedJson/shaped-json.$(OBJEXT) SkipLists/skiplist.$(OBJEXT) \ + SkipLists/skiplistIndex.$(OBJEXT) V8/v8-actions.$(OBJEXT) \ + V8/v8-conv.$(OBJEXT) V8/v8-json.$(OBJEXT) \ + V8/v8-line-editor.$(OBJEXT) V8/v8-shell.$(OBJEXT) \ + V8/v8-utils.$(OBJEXT) V8/v8-vocbase.$(OBJEXT) \ + Variant/VariantArray.$(OBJEXT) Variant/VariantBlob.$(OBJEXT) \ + Variant/VariantBoolean.$(OBJEXT) Variant/VariantDate.$(OBJEXT) \ + Variant/VariantDatetime.$(OBJEXT) \ + Variant/VariantDouble.$(OBJEXT) Variant/VariantFloat.$(OBJEXT) \ + Variant/VariantInt16.$(OBJEXT) Variant/VariantInt32.$(OBJEXT) \ + Variant/VariantInt64.$(OBJEXT) Variant/VariantInt8.$(OBJEXT) \ + Variant/VariantMatrix2.$(OBJEXT) Variant/VariantNull.$(OBJEXT) \ + Variant/VariantObject.$(OBJEXT) \ + Variant/VariantString.$(OBJEXT) \ + Variant/VariantUInt16.$(OBJEXT) \ + Variant/VariantUInt32.$(OBJEXT) \ + Variant/VariantUInt64.$(OBJEXT) Variant/VariantUInt8.$(OBJEXT) \ + Variant/VariantVector.$(OBJEXT) VocBase/barrier.$(OBJEXT) \ + VocBase/blob-collection.$(OBJEXT) VocBase/collection.$(OBJEXT) \ + VocBase/compactor.$(OBJEXT) VocBase/data-feeder.$(OBJEXT) \ + VocBase/datafile.$(OBJEXT) \ + VocBase/document-collection.$(OBJEXT) \ + VocBase/headers.$(OBJEXT) VocBase/index.$(OBJEXT) \ + VocBase/join-execute.$(OBJEXT) VocBase/join.$(OBJEXT) \ + VocBase/order.$(OBJEXT) VocBase/query-base.$(OBJEXT) \ + VocBase/query-error.$(OBJEXT) \ + VocBase/query-javascript.$(OBJEXT) \ + VocBase/query-node.$(OBJEXT) VocBase/query-parse.$(OBJEXT) \ + VocBase/query.$(OBJEXT) VocBase/select-result.$(OBJEXT) \ + VocBase/shadow-data.$(OBJEXT) \ + VocBase/simple-collection.$(OBJEXT) \ + VocBase/synchroniser.$(OBJEXT) VocBase/voc-shaper.$(OBJEXT) \ + VocBase/vocbase.$(OBJEXT) avocado_OBJECTS = $(am_avocado_OBJECTS) -avocado_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(avocado_LDFLAGS) \ - $(LDFLAGS) -o $@ +avocado_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/BasicsC depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) @@ -347,8 +282,8 @@ am__v_CXXLD_0 = @echo " CXXLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libavocadodb_a_SOURCES) $(avocado_SOURCES) -DIST_SOURCES = $(libavocadodb_a_SOURCES) $(avocado_SOURCES) +SOURCES = $(avocado_SOURCES) +DIST_SOURCES = $(avocado_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -429,7 +364,15 @@ LIBEV_CPPFLAGS = @LIBEV_CPPFLAGS@ LIBEV_LDFLAGS = @LIBEV_LDFLAGS@ LIBEV_LIBS = @LIBEV_LIBS@ LIBOBJS = @LIBOBJS@ -LIBS = +LIBS = \ + @BOOST_LIBS@ \ + @LIBEV_LIBS@ \ + @MATH_LIBS@ \ + @NCURSES_LIBS@ \ + @OPENSSL_LIBS@ \ + @READLINE_LIBS@ \ + @V8_LIBS@ + LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ @@ -524,10 +467,27 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -AM_CFLAGS = -AM_CXXFLAGS = -AM_CPPFLAGS = -D_SYSCONFDIR_='"${sysconfdir}"' -D_PKGDATADIR_='"${pkgdatadir}"' -D_DATABASEDIR_='"${localstatedir}/${PACKAGE_TARNAME}"' -AM_LDFLAGS = +AM_CPPFLAGS = \ + -D_SYSCONFDIR_='"${sysconfdir}"' \ + -D_PKGDATADIR_='"${pkgdatadir}"' \ + -D_DATABASEDIR_='"${localstatedir}/${PACKAGE_TARNAME}"' \ + @BOOST_CPPFLAGS@ \ + @LIBEV_CPPFLAGS@ \ + @MATH_CPPFLAGS@ \ + @NCURSES_CPPFLAGS@ \ + @OPENSSL_CPPFLAGS@ \ + @READLINE_CPPFLAGS@ \ + @V8_CPPFLAGS@ + +AM_LDFLAGS = \ + @BOOST_LDFLAGS@ \ + @LIBEV_LDFLAGS@ \ + @MATH_LDFLAGS@ \ + @NCURSES_LDFLAGS@ \ + @OPENSSL_LDFLAGS@ \ + @READLINE_LDFLAGS@ \ + @V8_LDFLAGS@ + BUILT_SOURCES = $(JAVASCRIPT_HEADER) $(FLEX_FILES) $(FLEXXX_FILES) \ $(BISON_FILES) $(BISONXX_FILES) Doxygen/.setup-directories \ .setup-directories $(am__append_3) @@ -537,9 +497,8 @@ BUILT_SOURCES = $(JAVASCRIPT_HEADER) $(FLEX_FILES) $(FLEXXX_FILES) \ ################################################################################ ################################################################################ -CLEANUP = $(DOXYGEN) $(WIKI) $(JAVASCRIPT_HEADER) $(am__append_1) \ - $(am__append_2) -noinst_LIBRARIES = libavocadodb.a +CLEANUP = $(DOXYGEN) $(WIKI) $(subst Doxygen/xml,Doxygen/wiki,$(WIKI)) \ + $(JAVASCRIPT_HEADER) $(am__append_1) $(am__append_2) nobase_pkgdata_DATA = \ $(shell find @srcdir@/js/system -name "*.js" -print) \ $(shell find @srcdir@/js/modules -name "*.js" -print) \ @@ -550,17 +509,7 @@ nobase_pkgdata_DATA = \ $(shell find @srcdir@/html -name "*.js" -print) \ $(shell find @srcdir@/html -name "*.png" -print) -libavocadodb_a_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - @BOOST_CPPFLAGS@ \ - @LIBEV_CPPFLAGS@ \ - @MATH_CPPFLAGS@ \ - @NCURSES_CPPFLAGS@ \ - @OPENSSL_CPPFLAGS@ \ - @READLINE_CPPFLAGS@ \ - @V8_CPPFLAGS@ - -libavocadodb_a_SOURCES = \ +avocado_SOURCES = \ Admin/ApplicationAdminServer.cpp \ Admin/RestAdminBaseHandler.cpp \ Admin/RestAdminFeConfigurationHandler.cpp \ @@ -620,6 +569,7 @@ libavocadodb_a_SOURCES = \ Dispatcher/Job.cpp \ GeneralServer/GeneralFigures.cpp \ GeoIndex/GeoIndex.c \ + HashIndex/hashindex.c \ HttpServer/ApplicationHttpServer.cpp \ HttpServer/ApplicationHttpServerImpl.cpp \ HttpServer/HttpCommTask.cpp \ @@ -644,6 +594,11 @@ libavocadodb_a_SOURCES = \ Logger/LoggerStream.cpp \ Logger/LoggerTiming.cpp \ ProgramOptions/program-options.c \ + QL/ast-query.c \ + QL/formatter.c \ + QL/optimize.c \ + QL/parser.c \ + QL/tokens.c \ Rest/AddressPort.cpp \ Rest/AnyServer.cpp \ Rest/HttpRequest.cpp \ @@ -651,6 +606,16 @@ libavocadodb_a_SOURCES = \ Rest/Initialise.cpp \ Rest/SslInterface.cpp \ Rest/Url.cpp \ + RestHandler/RestActionHandler.cpp \ + RestHandler/RestCollectionHandler.cpp \ + RestHandler/RestSystemActionHandler.cpp \ + RestHandler/RestVocbaseBaseHandler.cpp \ + RestServer/ActionDispatcherThread.cpp \ + RestServer/AvocadoHttpServer.cpp \ + RestServer/AvocadoServer.cpp \ + RestServer/JSLoader.cpp \ + RestServer/SystemActionDispatcherThread.cpp \ + RestServer/avocado.cpp \ ResultGenerator/HtmlResultGenerator.cpp \ ResultGenerator/Initialise.cpp \ ResultGenerator/JsonResultGenerator.cpp \ @@ -673,12 +638,14 @@ libavocadodb_a_SOURCES = \ ShapedJson/json-shaper.c \ ShapedJson/shape-accessor.c \ ShapedJson/shaped-json.c \ + SkipLists/skiplist.c \ + SkipLists/skiplistIndex.c \ V8/v8-actions.cpp \ + V8/v8-conv.cpp \ V8/v8-json.cpp \ + V8/v8-line-editor.cpp \ V8/v8-shell.cpp \ V8/v8-utils.cpp \ - V8/v8-conv.cpp \ - V8/v8-line-editor.cpp \ V8/v8-vocbase.cpp \ Variant/VariantArray.cpp \ Variant/VariantBlob.cpp \ @@ -700,78 +667,30 @@ libavocadodb_a_SOURCES = \ Variant/VariantUInt64.cpp \ Variant/VariantUInt8.cpp \ Variant/VariantVector.cpp \ - VocBase/data-feeder.c \ - VocBase/join-execute.c \ - VocBase/order.c \ + VocBase/barrier.c \ VocBase/blob-collection.c \ VocBase/collection.c \ VocBase/compactor.c \ + VocBase/data-feeder.c \ VocBase/datafile.c \ VocBase/document-collection.c \ - VocBase/fluent-query.c \ - VocBase/select-result.c \ - VocBase/join.c \ - VocBase/query.c \ VocBase/headers.c \ VocBase/index.c \ - VocBase/result-set.c \ + VocBase/join-execute.c \ + VocBase/join.c \ + VocBase/order.c \ + VocBase/query-base.c \ + VocBase/query-error.c \ + VocBase/query-javascript.c \ + VocBase/query-node.c \ + VocBase/query-parse.c \ + VocBase/query.c \ + VocBase/select-result.c \ + VocBase/shadow-data.c \ VocBase/simple-collection.c \ VocBase/synchroniser.c \ VocBase/voc-shaper.c \ - VocBase/vocbase.c \ - QL/ParserWrapper.cpp \ - QL/ast-node.c \ - QL/ast-query.c \ - QL/error.c \ - QL/formatter.c \ - QL/javascripter.c \ - QL/optimize.c \ - QL/parser-context.c \ - QL/parser.c \ - QL/tokens.c - -avocado_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - @BOOST_CPPFLAGS@ \ - @LIBEV_CPPFLAGS@ \ - @MATH_CPPFLAGS@ \ - @NCURSES_CPPFLAGS@ \ - @OPENSSL_CPPFLAGS@ \ - @READLINE_CPPFLAGS@ \ - @V8_CPPFLAGS@ - -avocado_LDFLAGS = \ - -L. \ - @BOOST_LDFLAGS@ \ - @LIBEV_LDFLAGS@ \ - @MATH_LDFLAGS@ \ - @NCURSES_LDFLAGS@ \ - @OPENSSL_LDFLAGS@ \ - @READLINE_LDFLAGS@ \ - @V8_LDFLAGS@ - -avocado_LDADD = \ - -lavocadodb \ - @BOOST_LIBS@ \ - @LIBEV_LIBS@ \ - @MATH_LIBS@ \ - @NCURSES_LIBS@ \ - @OPENSSL_LIBS@ \ - @READLINE_LIBS@ \ - @V8_LIBS@ - -avocado_DEPENDENCIES = @builddir@/libavocadodb.a -avocado_SOURCES = \ - RestHandler/RestActionHandler.cpp \ - RestHandler/RestDocumentHandler.cpp \ - RestHandler/RestSystemActionHandler.cpp \ - RestHandler/RestVocbaseBaseHandler.cpp \ - RestServer/ActionDispatcherThread.cpp \ - RestServer/AvocadoHttpServer.cpp \ - RestServer/AvocadoServer.cpp \ - RestServer/JSLoader.cpp \ - RestServer/SystemActionDispatcherThread.cpp \ - RestServer/avocado.cpp + VocBase/vocbase.c ################################################################################ @@ -819,6 +738,7 @@ DOXYGEN = \ Doxygen/js/bootstrap/print.c \ Doxygen/js/modules/graph.c \ Doxygen/js/modules/jsunity.c \ + Doxygen/js/modules/simple-query.c \ Doxygen/js/server/modules.c \ Doxygen/js/server/actions.c \ Doxygen/js/server/json.c \ @@ -851,15 +771,20 @@ WIKI = \ Doxygen/xml/JSModules.md \ Doxygen/xml/JavaScriptFunc.md \ Doxygen/xml/JavaScriptFuncIndex.md \ - Doxygen/xml/Pagination.md \ Doxygen/xml/RefManual.md \ Doxygen/xml/RestDocument.md \ - Doxygen/xml/RestInterface.md \ Doxygen/xml/RestSystem.md \ + Doxygen/xml/SimpleQueries.md \ Doxygen/xml/StartStop.md \ Doxygen/xml/UserManual.md \ Doxygen/xml/jsUnity.md +@ENABLE_32BIT_TRUE@@ENABLE_ALL_IN_ONE_TRUE@LIBEV_BUILD_VERSION = ARCH.ia32 +@ENABLE_64BIT_TRUE@@ENABLE_ALL_IN_ONE_TRUE@LIBEV_BUILD_VERSION = ARCH.x64 +@ENABLE_ALL_IN_ONE_TRUE@@ENABLE_FORCE_32BIT_FALSE@LIBEV_CFLAGS_32 = -O2 -g +@ENABLE_ALL_IN_ONE_TRUE@@ENABLE_FORCE_32BIT_TRUE@LIBEV_CFLAGS_32 = -m32 -O2 -g +@ENABLE_ALL_IN_ONE_TRUE@@ENABLE_FORCE_32BIT_FALSE@LIBEV_LDFLAGS_32 = +@ENABLE_ALL_IN_ONE_TRUE@@ENABLE_FORCE_32BIT_TRUE@LIBEV_LDFLAGS_32 = -m32 @ENABLE_32BIT_TRUE@@ENABLE_ALL_IN_ONE_TRUE@V8_BUILD_VERSION = ia32 ################################################################################ @@ -933,518 +858,10 @@ distclean-hdr: -rm -f config/config.h config/stamp-h1 BasicsC/local-configuration.h BasicsC/stamp-h2 Doxygen/avocado.doxy: $(top_builddir)/config.status $(top_srcdir)/Doxygen/avocado.doxy.in cd $(top_builddir) && $(SHELL) ./config.status $@ - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -Admin/$(am__dirstamp): - @$(MKDIR_P) Admin - @: > Admin/$(am__dirstamp) -Admin/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) Admin/$(DEPDIR) - @: > Admin/$(DEPDIR)/$(am__dirstamp) -Admin/libavocadodb_a-ApplicationAdminServer.$(OBJEXT): \ - Admin/$(am__dirstamp) Admin/$(DEPDIR)/$(am__dirstamp) -Admin/libavocadodb_a-RestAdminBaseHandler.$(OBJEXT): \ - Admin/$(am__dirstamp) Admin/$(DEPDIR)/$(am__dirstamp) -Admin/libavocadodb_a-RestAdminFeConfigurationHandler.$(OBJEXT): \ - Admin/$(am__dirstamp) Admin/$(DEPDIR)/$(am__dirstamp) -Admin/libavocadodb_a-RestAdminLogHandler.$(OBJEXT): \ - Admin/$(am__dirstamp) Admin/$(DEPDIR)/$(am__dirstamp) -Admin/libavocadodb_a-RestBaseHandler.$(OBJEXT): Admin/$(am__dirstamp) \ - Admin/$(DEPDIR)/$(am__dirstamp) -Admin/libavocadodb_a-RestVersionHandler.$(OBJEXT): \ - Admin/$(am__dirstamp) Admin/$(DEPDIR)/$(am__dirstamp) -ApplicationServer/$(am__dirstamp): - @$(MKDIR_P) ApplicationServer - @: > ApplicationServer/$(am__dirstamp) -ApplicationServer/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ApplicationServer/$(DEPDIR) - @: > ApplicationServer/$(DEPDIR)/$(am__dirstamp) -ApplicationServer/libavocadodb_a-ApplicationServer.$(OBJEXT): \ - ApplicationServer/$(am__dirstamp) \ - ApplicationServer/$(DEPDIR)/$(am__dirstamp) -ApplicationServer/libavocadodb_a-ApplicationServerImpl.$(OBJEXT): \ - ApplicationServer/$(am__dirstamp) \ - ApplicationServer/$(DEPDIR)/$(am__dirstamp) -ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.$(OBJEXT): \ - ApplicationServer/$(am__dirstamp) \ - ApplicationServer/$(DEPDIR)/$(am__dirstamp) -Basics/$(am__dirstamp): - @$(MKDIR_P) Basics - @: > Basics/$(am__dirstamp) -Basics/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) Basics/$(DEPDIR) - @: > Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-ConditionLocker.$(OBJEXT): \ - Basics/$(am__dirstamp) Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-ConditionVariable.$(OBJEXT): \ - Basics/$(am__dirstamp) Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-FileUtils.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-Initialise.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-LibraryLoader.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-Mutex.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-MutexLocker.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-ProgramOptions.$(OBJEXT): \ - Basics/$(am__dirstamp) Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-ProgramOptionsDescription.$(OBJEXT): \ - Basics/$(am__dirstamp) Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-Random.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-ReadLocker.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-ReadUnlocker.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-ReadWriteLock.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-StringUtils.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-Thread.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-Timing.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-WriteLocker.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -Basics/libavocadodb_a-WriteUnlocker.$(OBJEXT): Basics/$(am__dirstamp) \ - Basics/$(DEPDIR)/$(am__dirstamp) -BasicsC/$(am__dirstamp): - @$(MKDIR_P) BasicsC - @: > BasicsC/$(am__dirstamp) -BasicsC/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) BasicsC/$(DEPDIR) - @: > BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-associative-multi.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-associative.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-conversions.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-csv.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-error.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-files.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-hashes.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-init.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-json.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-locks-macos.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-locks-posix.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-logging.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-memory.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-process-utils.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-random.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-socket-utils.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-string-buffer.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-strings.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-structures.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-system-functions.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-terminal-utils-ncurses.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-terminal-utils.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-threads-posix.$(OBJEXT): \ - BasicsC/$(am__dirstamp) BasicsC/$(DEPDIR)/$(am__dirstamp) -BasicsC/libavocadodb_a-vector.$(OBJEXT): BasicsC/$(am__dirstamp) \ - BasicsC/$(DEPDIR)/$(am__dirstamp) -Dispatcher/$(am__dirstamp): - @$(MKDIR_P) Dispatcher - @: > Dispatcher/$(am__dirstamp) -Dispatcher/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) Dispatcher/$(DEPDIR) - @: > Dispatcher/$(DEPDIR)/$(am__dirstamp) -Dispatcher/libavocadodb_a-ApplicationServerDispatcher.$(OBJEXT): \ - Dispatcher/$(am__dirstamp) \ - Dispatcher/$(DEPDIR)/$(am__dirstamp) -Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.$(OBJEXT): \ - Dispatcher/$(am__dirstamp) \ - Dispatcher/$(DEPDIR)/$(am__dirstamp) -Dispatcher/libavocadodb_a-DispatcherImpl.$(OBJEXT): \ - Dispatcher/$(am__dirstamp) \ - Dispatcher/$(DEPDIR)/$(am__dirstamp) -Dispatcher/libavocadodb_a-DispatcherQueue.$(OBJEXT): \ - Dispatcher/$(am__dirstamp) \ - Dispatcher/$(DEPDIR)/$(am__dirstamp) -Dispatcher/libavocadodb_a-DispatcherThread.$(OBJEXT): \ - Dispatcher/$(am__dirstamp) \ - Dispatcher/$(DEPDIR)/$(am__dirstamp) -Dispatcher/libavocadodb_a-Job.$(OBJEXT): Dispatcher/$(am__dirstamp) \ - Dispatcher/$(DEPDIR)/$(am__dirstamp) -GeneralServer/$(am__dirstamp): - @$(MKDIR_P) GeneralServer - @: > GeneralServer/$(am__dirstamp) -GeneralServer/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) GeneralServer/$(DEPDIR) - @: > GeneralServer/$(DEPDIR)/$(am__dirstamp) -GeneralServer/libavocadodb_a-GeneralFigures.$(OBJEXT): \ - GeneralServer/$(am__dirstamp) \ - GeneralServer/$(DEPDIR)/$(am__dirstamp) -GeoIndex/$(am__dirstamp): - @$(MKDIR_P) GeoIndex - @: > GeoIndex/$(am__dirstamp) -GeoIndex/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) GeoIndex/$(DEPDIR) - @: > GeoIndex/$(DEPDIR)/$(am__dirstamp) -GeoIndex/libavocadodb_a-GeoIndex.$(OBJEXT): GeoIndex/$(am__dirstamp) \ - GeoIndex/$(DEPDIR)/$(am__dirstamp) -HttpServer/$(am__dirstamp): - @$(MKDIR_P) HttpServer - @: > HttpServer/$(am__dirstamp) -HttpServer/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) HttpServer/$(DEPDIR) - @: > HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-ApplicationHttpServer.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-ApplicationHttpServerImpl.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-HttpCommTask.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-HttpHandler.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-HttpHandlerFactory.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-PathHandler.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-RedirectHandler.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpServer/libavocadodb_a-ServiceUnavailableHandler.$(OBJEXT): \ - HttpServer/$(am__dirstamp) \ - HttpServer/$(DEPDIR)/$(am__dirstamp) -HttpsServer/$(am__dirstamp): - @$(MKDIR_P) HttpsServer - @: > HttpsServer/$(am__dirstamp) -HttpsServer/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) HttpsServer/$(DEPDIR) - @: > HttpsServer/$(DEPDIR)/$(am__dirstamp) -HttpsServer/libavocadodb_a-ApplicationHttpsServer.$(OBJEXT): \ - HttpsServer/$(am__dirstamp) \ - HttpsServer/$(DEPDIR)/$(am__dirstamp) -HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.$(OBJEXT): \ - HttpsServer/$(am__dirstamp) \ - HttpsServer/$(DEPDIR)/$(am__dirstamp) -HttpsServer/libavocadodb_a-HttpsAsyncCommTask.$(OBJEXT): \ - HttpsServer/$(am__dirstamp) \ - HttpsServer/$(DEPDIR)/$(am__dirstamp) -HttpsServer/libavocadodb_a-HttpsServer.$(OBJEXT): \ - HttpsServer/$(am__dirstamp) \ - HttpsServer/$(DEPDIR)/$(am__dirstamp) -HttpsServer/libavocadodb_a-HttpsServerImpl.$(OBJEXT): \ - HttpsServer/$(am__dirstamp) \ - HttpsServer/$(DEPDIR)/$(am__dirstamp) -JsonParser/$(am__dirstamp): - @$(MKDIR_P) JsonParser - @: > JsonParser/$(am__dirstamp) -JsonParser/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) JsonParser/$(DEPDIR) - @: > JsonParser/$(DEPDIR)/$(am__dirstamp) -JsonParser/libavocadodb_a-json-parser.$(OBJEXT): \ - JsonParser/$(am__dirstamp) \ - JsonParser/$(DEPDIR)/$(am__dirstamp) -JsonParserX/$(am__dirstamp): - @$(MKDIR_P) JsonParserX - @: > JsonParserX/$(am__dirstamp) -JsonParserX/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) JsonParserX/$(DEPDIR) - @: > JsonParserX/$(DEPDIR)/$(am__dirstamp) -JsonParserX/libavocadodb_a-InputParser.$(OBJEXT): \ - JsonParserX/$(am__dirstamp) \ - JsonParserX/$(DEPDIR)/$(am__dirstamp) -JsonParserX/libavocadodb_a-JsonParserX.$(OBJEXT): \ - JsonParserX/$(am__dirstamp) \ - JsonParserX/$(DEPDIR)/$(am__dirstamp) -JsonParserX/libavocadodb_a-JsonParserXDriver.$(OBJEXT): \ - JsonParserX/$(am__dirstamp) \ - JsonParserX/$(DEPDIR)/$(am__dirstamp) -JsonParserX/libavocadodb_a-JsonScannerX.$(OBJEXT): \ - JsonParserX/$(am__dirstamp) \ - JsonParserX/$(DEPDIR)/$(am__dirstamp) -Logger/$(am__dirstamp): - @$(MKDIR_P) Logger - @: > Logger/$(am__dirstamp) -Logger/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) Logger/$(DEPDIR) - @: > Logger/$(DEPDIR)/$(am__dirstamp) -Logger/libavocadodb_a-Logger.$(OBJEXT): Logger/$(am__dirstamp) \ - Logger/$(DEPDIR)/$(am__dirstamp) -Logger/libavocadodb_a-LoggerData.$(OBJEXT): Logger/$(am__dirstamp) \ - Logger/$(DEPDIR)/$(am__dirstamp) -Logger/libavocadodb_a-LoggerInfo.$(OBJEXT): Logger/$(am__dirstamp) \ - Logger/$(DEPDIR)/$(am__dirstamp) -Logger/libavocadodb_a-LoggerStream.$(OBJEXT): Logger/$(am__dirstamp) \ - Logger/$(DEPDIR)/$(am__dirstamp) -Logger/libavocadodb_a-LoggerTiming.$(OBJEXT): Logger/$(am__dirstamp) \ - Logger/$(DEPDIR)/$(am__dirstamp) -ProgramOptions/$(am__dirstamp): - @$(MKDIR_P) ProgramOptions - @: > ProgramOptions/$(am__dirstamp) -ProgramOptions/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ProgramOptions/$(DEPDIR) - @: > ProgramOptions/$(DEPDIR)/$(am__dirstamp) -ProgramOptions/libavocadodb_a-program-options.$(OBJEXT): \ - ProgramOptions/$(am__dirstamp) \ - ProgramOptions/$(DEPDIR)/$(am__dirstamp) -Rest/$(am__dirstamp): - @$(MKDIR_P) Rest - @: > Rest/$(am__dirstamp) -Rest/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) Rest/$(DEPDIR) - @: > Rest/$(DEPDIR)/$(am__dirstamp) -Rest/libavocadodb_a-AddressPort.$(OBJEXT): Rest/$(am__dirstamp) \ - Rest/$(DEPDIR)/$(am__dirstamp) -Rest/libavocadodb_a-AnyServer.$(OBJEXT): Rest/$(am__dirstamp) \ - Rest/$(DEPDIR)/$(am__dirstamp) -Rest/libavocadodb_a-HttpRequest.$(OBJEXT): Rest/$(am__dirstamp) \ - Rest/$(DEPDIR)/$(am__dirstamp) -Rest/libavocadodb_a-HttpResponse.$(OBJEXT): Rest/$(am__dirstamp) \ - Rest/$(DEPDIR)/$(am__dirstamp) -Rest/libavocadodb_a-Initialise.$(OBJEXT): Rest/$(am__dirstamp) \ - Rest/$(DEPDIR)/$(am__dirstamp) -Rest/libavocadodb_a-SslInterface.$(OBJEXT): Rest/$(am__dirstamp) \ - Rest/$(DEPDIR)/$(am__dirstamp) -Rest/libavocadodb_a-Url.$(OBJEXT): Rest/$(am__dirstamp) \ - Rest/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/$(am__dirstamp): - @$(MKDIR_P) ResultGenerator - @: > ResultGenerator/$(am__dirstamp) -ResultGenerator/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ResultGenerator/$(DEPDIR) - @: > ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-HtmlResultGenerator.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-Initialise.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-JsonResultGenerator.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-JsonXResultGenerator.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-OutputGenerator.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-PhpResultGenerator.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-ResultGenerator.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -ResultGenerator/libavocadodb_a-XmlResultGenerator.$(OBJEXT): \ - ResultGenerator/$(am__dirstamp) \ - ResultGenerator/$(DEPDIR)/$(am__dirstamp) -Scheduler/$(am__dirstamp): - @$(MKDIR_P) Scheduler - @: > Scheduler/$(am__dirstamp) -Scheduler/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) Scheduler/$(DEPDIR) - @: > Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-AsyncTask.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-ConnectionTask.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-ListenTask.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-PeriodicTask.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-Scheduler.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-SchedulerLibev.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-SchedulerThread.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-SignalTask.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-SocketTask.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-Task.$(OBJEXT): Scheduler/$(am__dirstamp) \ - Scheduler/$(DEPDIR)/$(am__dirstamp) -Scheduler/libavocadodb_a-TimerTask.$(OBJEXT): \ - Scheduler/$(am__dirstamp) Scheduler/$(DEPDIR)/$(am__dirstamp) -ShapedJson/$(am__dirstamp): - @$(MKDIR_P) ShapedJson - @: > ShapedJson/$(am__dirstamp) -ShapedJson/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) ShapedJson/$(DEPDIR) - @: > ShapedJson/$(DEPDIR)/$(am__dirstamp) -ShapedJson/libavocadodb_a-json-shaper.$(OBJEXT): \ - ShapedJson/$(am__dirstamp) \ - ShapedJson/$(DEPDIR)/$(am__dirstamp) -ShapedJson/libavocadodb_a-shape-accessor.$(OBJEXT): \ - ShapedJson/$(am__dirstamp) \ - ShapedJson/$(DEPDIR)/$(am__dirstamp) -ShapedJson/libavocadodb_a-shaped-json.$(OBJEXT): \ - ShapedJson/$(am__dirstamp) \ - ShapedJson/$(DEPDIR)/$(am__dirstamp) -V8/$(am__dirstamp): - @$(MKDIR_P) V8 - @: > V8/$(am__dirstamp) -V8/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) V8/$(DEPDIR) - @: > V8/$(DEPDIR)/$(am__dirstamp) -V8/libavocadodb_a-v8-actions.$(OBJEXT): V8/$(am__dirstamp) \ - V8/$(DEPDIR)/$(am__dirstamp) -V8/libavocadodb_a-v8-json.$(OBJEXT): V8/$(am__dirstamp) \ - V8/$(DEPDIR)/$(am__dirstamp) -V8/libavocadodb_a-v8-shell.$(OBJEXT): V8/$(am__dirstamp) \ - V8/$(DEPDIR)/$(am__dirstamp) -V8/libavocadodb_a-v8-utils.$(OBJEXT): V8/$(am__dirstamp) \ - V8/$(DEPDIR)/$(am__dirstamp) -V8/libavocadodb_a-v8-conv.$(OBJEXT): V8/$(am__dirstamp) \ - V8/$(DEPDIR)/$(am__dirstamp) -V8/libavocadodb_a-v8-line-editor.$(OBJEXT): V8/$(am__dirstamp) \ - V8/$(DEPDIR)/$(am__dirstamp) -V8/libavocadodb_a-v8-vocbase.$(OBJEXT): V8/$(am__dirstamp) \ - V8/$(DEPDIR)/$(am__dirstamp) -Variant/$(am__dirstamp): - @$(MKDIR_P) Variant - @: > Variant/$(am__dirstamp) -Variant/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) Variant/$(DEPDIR) - @: > Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantArray.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantBlob.$(OBJEXT): Variant/$(am__dirstamp) \ - Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantBoolean.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantDate.$(OBJEXT): Variant/$(am__dirstamp) \ - Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantDatetime.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantDouble.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantFloat.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantInt16.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantInt32.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantInt64.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantInt8.$(OBJEXT): Variant/$(am__dirstamp) \ - Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantMatrix2.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantNull.$(OBJEXT): Variant/$(am__dirstamp) \ - Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantObject.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantString.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantUInt16.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantUInt32.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantUInt64.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantUInt8.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -Variant/libavocadodb_a-VariantVector.$(OBJEXT): \ - Variant/$(am__dirstamp) Variant/$(DEPDIR)/$(am__dirstamp) -VocBase/$(am__dirstamp): - @$(MKDIR_P) VocBase - @: > VocBase/$(am__dirstamp) -VocBase/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) VocBase/$(DEPDIR) - @: > VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-data-feeder.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-join-execute.$(OBJEXT): \ - VocBase/$(am__dirstamp) VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-order.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-blob-collection.$(OBJEXT): \ - VocBase/$(am__dirstamp) VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-collection.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-compactor.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-datafile.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-document-collection.$(OBJEXT): \ - VocBase/$(am__dirstamp) VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-fluent-query.$(OBJEXT): \ - VocBase/$(am__dirstamp) VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-select-result.$(OBJEXT): \ - VocBase/$(am__dirstamp) VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-join.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-query.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-headers.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-index.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-result-set.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-simple-collection.$(OBJEXT): \ - VocBase/$(am__dirstamp) VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-synchroniser.$(OBJEXT): \ - VocBase/$(am__dirstamp) VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-voc-shaper.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -VocBase/libavocadodb_a-vocbase.$(OBJEXT): VocBase/$(am__dirstamp) \ - VocBase/$(DEPDIR)/$(am__dirstamp) -QL/$(am__dirstamp): - @$(MKDIR_P) QL - @: > QL/$(am__dirstamp) -QL/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) QL/$(DEPDIR) - @: > QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-ParserWrapper.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-ast-node.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-ast-query.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-error.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-formatter.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-javascripter.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-optimize.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-parser-context.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-parser.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -QL/libavocadodb_a-tokens.$(OBJEXT): QL/$(am__dirstamp) \ - QL/$(DEPDIR)/$(am__dirstamp) -libavocadodb.a: $(libavocadodb_a_OBJECTS) $(libavocadodb_a_DEPENDENCIES) - $(AM_V_at)-rm -f libavocadodb.a - $(AM_V_AR)$(libavocadodb_a_AR) libavocadodb.a $(libavocadodb_a_OBJECTS) $(libavocadodb_a_LIBADD) - $(AM_V_at)$(RANLIB) libavocadodb.a -install-binPROGRAMS: $(bin_PROGRAMS) +install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -1461,39 +878,334 @@ install-binPROGRAMS: $(bin_PROGRAMS) while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done -uninstall-binPROGRAMS: +uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files + echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(sbindir)" && rm -f $$files -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +clean-sbinPROGRAMS: + -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS) +Admin/$(am__dirstamp): + @$(MKDIR_P) Admin + @: > Admin/$(am__dirstamp) +Admin/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) Admin/$(DEPDIR) + @: > Admin/$(DEPDIR)/$(am__dirstamp) +Admin/ApplicationAdminServer.$(OBJEXT): Admin/$(am__dirstamp) \ + Admin/$(DEPDIR)/$(am__dirstamp) +Admin/RestAdminBaseHandler.$(OBJEXT): Admin/$(am__dirstamp) \ + Admin/$(DEPDIR)/$(am__dirstamp) +Admin/RestAdminFeConfigurationHandler.$(OBJEXT): \ + Admin/$(am__dirstamp) Admin/$(DEPDIR)/$(am__dirstamp) +Admin/RestAdminLogHandler.$(OBJEXT): Admin/$(am__dirstamp) \ + Admin/$(DEPDIR)/$(am__dirstamp) +Admin/RestBaseHandler.$(OBJEXT): Admin/$(am__dirstamp) \ + Admin/$(DEPDIR)/$(am__dirstamp) +Admin/RestVersionHandler.$(OBJEXT): Admin/$(am__dirstamp) \ + Admin/$(DEPDIR)/$(am__dirstamp) +ApplicationServer/$(am__dirstamp): + @$(MKDIR_P) ApplicationServer + @: > ApplicationServer/$(am__dirstamp) +ApplicationServer/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ApplicationServer/$(DEPDIR) + @: > ApplicationServer/$(DEPDIR)/$(am__dirstamp) +ApplicationServer/ApplicationServer.$(OBJEXT): \ + ApplicationServer/$(am__dirstamp) \ + ApplicationServer/$(DEPDIR)/$(am__dirstamp) +ApplicationServer/ApplicationServerImpl.$(OBJEXT): \ + ApplicationServer/$(am__dirstamp) \ + ApplicationServer/$(DEPDIR)/$(am__dirstamp) +ApplicationServer/ApplicationServerSchedulerImpl.$(OBJEXT): \ + ApplicationServer/$(am__dirstamp) \ + ApplicationServer/$(DEPDIR)/$(am__dirstamp) +Basics/$(am__dirstamp): + @$(MKDIR_P) Basics + @: > Basics/$(am__dirstamp) +Basics/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) Basics/$(DEPDIR) + @: > Basics/$(DEPDIR)/$(am__dirstamp) +Basics/ConditionLocker.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/ConditionVariable.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/FileUtils.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/Initialise.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/LibraryLoader.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/Mutex.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/MutexLocker.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/ProgramOptions.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/ProgramOptionsDescription.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/Random.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/ReadLocker.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/ReadUnlocker.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/ReadWriteLock.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/StringUtils.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/Thread.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/Timing.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/WriteLocker.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +Basics/WriteUnlocker.$(OBJEXT): Basics/$(am__dirstamp) \ + Basics/$(DEPDIR)/$(am__dirstamp) +BasicsC/$(am__dirstamp): + @$(MKDIR_P) BasicsC + @: > BasicsC/$(am__dirstamp) +BasicsC/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) BasicsC/$(DEPDIR) + @: > BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/associative-multi.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/associative.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/conversions.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/csv.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/error.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/files.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/hashes.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/init.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/json.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/locks-macos.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/locks-posix.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/logging.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/memory.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/process-utils.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/random.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/socket-utils.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/string-buffer.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/strings.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/structures.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/system-functions.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/terminal-utils-ncurses.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/terminal-utils.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/threads-posix.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +BasicsC/vector.$(OBJEXT): BasicsC/$(am__dirstamp) \ + BasicsC/$(DEPDIR)/$(am__dirstamp) +Dispatcher/$(am__dirstamp): + @$(MKDIR_P) Dispatcher + @: > Dispatcher/$(am__dirstamp) +Dispatcher/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) Dispatcher/$(DEPDIR) + @: > Dispatcher/$(DEPDIR)/$(am__dirstamp) +Dispatcher/ApplicationServerDispatcher.$(OBJEXT): \ + Dispatcher/$(am__dirstamp) \ + Dispatcher/$(DEPDIR)/$(am__dirstamp) +Dispatcher/ApplicationServerDispatcherImpl.$(OBJEXT): \ + Dispatcher/$(am__dirstamp) \ + Dispatcher/$(DEPDIR)/$(am__dirstamp) +Dispatcher/DispatcherImpl.$(OBJEXT): Dispatcher/$(am__dirstamp) \ + Dispatcher/$(DEPDIR)/$(am__dirstamp) +Dispatcher/DispatcherQueue.$(OBJEXT): Dispatcher/$(am__dirstamp) \ + Dispatcher/$(DEPDIR)/$(am__dirstamp) +Dispatcher/DispatcherThread.$(OBJEXT): Dispatcher/$(am__dirstamp) \ + Dispatcher/$(DEPDIR)/$(am__dirstamp) +Dispatcher/Job.$(OBJEXT): Dispatcher/$(am__dirstamp) \ + Dispatcher/$(DEPDIR)/$(am__dirstamp) +GeneralServer/$(am__dirstamp): + @$(MKDIR_P) GeneralServer + @: > GeneralServer/$(am__dirstamp) +GeneralServer/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) GeneralServer/$(DEPDIR) + @: > GeneralServer/$(DEPDIR)/$(am__dirstamp) +GeneralServer/GeneralFigures.$(OBJEXT): GeneralServer/$(am__dirstamp) \ + GeneralServer/$(DEPDIR)/$(am__dirstamp) +GeoIndex/$(am__dirstamp): + @$(MKDIR_P) GeoIndex + @: > GeoIndex/$(am__dirstamp) +GeoIndex/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) GeoIndex/$(DEPDIR) + @: > GeoIndex/$(DEPDIR)/$(am__dirstamp) +GeoIndex/GeoIndex.$(OBJEXT): GeoIndex/$(am__dirstamp) \ + GeoIndex/$(DEPDIR)/$(am__dirstamp) +HashIndex/$(am__dirstamp): + @$(MKDIR_P) HashIndex + @: > HashIndex/$(am__dirstamp) +HashIndex/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) HashIndex/$(DEPDIR) + @: > HashIndex/$(DEPDIR)/$(am__dirstamp) +HashIndex/hashindex.$(OBJEXT): HashIndex/$(am__dirstamp) \ + HashIndex/$(DEPDIR)/$(am__dirstamp) +HttpServer/$(am__dirstamp): + @$(MKDIR_P) HttpServer + @: > HttpServer/$(am__dirstamp) +HttpServer/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) HttpServer/$(DEPDIR) + @: > HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/ApplicationHttpServer.$(OBJEXT): \ + HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/ApplicationHttpServerImpl.$(OBJEXT): \ + HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/HttpCommTask.$(OBJEXT): HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/HttpHandler.$(OBJEXT): HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/HttpHandlerFactory.$(OBJEXT): HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/PathHandler.$(OBJEXT): HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/RedirectHandler.$(OBJEXT): HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpServer/ServiceUnavailableHandler.$(OBJEXT): \ + HttpServer/$(am__dirstamp) \ + HttpServer/$(DEPDIR)/$(am__dirstamp) +HttpsServer/$(am__dirstamp): + @$(MKDIR_P) HttpsServer + @: > HttpsServer/$(am__dirstamp) +HttpsServer/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) HttpsServer/$(DEPDIR) + @: > HttpsServer/$(DEPDIR)/$(am__dirstamp) +HttpsServer/ApplicationHttpsServer.$(OBJEXT): \ + HttpsServer/$(am__dirstamp) \ + HttpsServer/$(DEPDIR)/$(am__dirstamp) +HttpsServer/ApplicationHttpsServerImpl.$(OBJEXT): \ + HttpsServer/$(am__dirstamp) \ + HttpsServer/$(DEPDIR)/$(am__dirstamp) +HttpsServer/HttpsAsyncCommTask.$(OBJEXT): HttpsServer/$(am__dirstamp) \ + HttpsServer/$(DEPDIR)/$(am__dirstamp) +HttpsServer/HttpsServer.$(OBJEXT): HttpsServer/$(am__dirstamp) \ + HttpsServer/$(DEPDIR)/$(am__dirstamp) +HttpsServer/HttpsServerImpl.$(OBJEXT): HttpsServer/$(am__dirstamp) \ + HttpsServer/$(DEPDIR)/$(am__dirstamp) +JsonParser/$(am__dirstamp): + @$(MKDIR_P) JsonParser + @: > JsonParser/$(am__dirstamp) +JsonParser/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) JsonParser/$(DEPDIR) + @: > JsonParser/$(DEPDIR)/$(am__dirstamp) +JsonParser/json-parser.$(OBJEXT): JsonParser/$(am__dirstamp) \ + JsonParser/$(DEPDIR)/$(am__dirstamp) +JsonParserX/$(am__dirstamp): + @$(MKDIR_P) JsonParserX + @: > JsonParserX/$(am__dirstamp) +JsonParserX/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) JsonParserX/$(DEPDIR) + @: > JsonParserX/$(DEPDIR)/$(am__dirstamp) +JsonParserX/InputParser.$(OBJEXT): JsonParserX/$(am__dirstamp) \ + JsonParserX/$(DEPDIR)/$(am__dirstamp) +JsonParserX/JsonParserX.$(OBJEXT): JsonParserX/$(am__dirstamp) \ + JsonParserX/$(DEPDIR)/$(am__dirstamp) +JsonParserX/JsonParserXDriver.$(OBJEXT): JsonParserX/$(am__dirstamp) \ + JsonParserX/$(DEPDIR)/$(am__dirstamp) +JsonParserX/JsonScannerX.$(OBJEXT): JsonParserX/$(am__dirstamp) \ + JsonParserX/$(DEPDIR)/$(am__dirstamp) +Logger/$(am__dirstamp): + @$(MKDIR_P) Logger + @: > Logger/$(am__dirstamp) +Logger/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) Logger/$(DEPDIR) + @: > Logger/$(DEPDIR)/$(am__dirstamp) +Logger/Logger.$(OBJEXT): Logger/$(am__dirstamp) \ + Logger/$(DEPDIR)/$(am__dirstamp) +Logger/LoggerData.$(OBJEXT): Logger/$(am__dirstamp) \ + Logger/$(DEPDIR)/$(am__dirstamp) +Logger/LoggerInfo.$(OBJEXT): Logger/$(am__dirstamp) \ + Logger/$(DEPDIR)/$(am__dirstamp) +Logger/LoggerStream.$(OBJEXT): Logger/$(am__dirstamp) \ + Logger/$(DEPDIR)/$(am__dirstamp) +Logger/LoggerTiming.$(OBJEXT): Logger/$(am__dirstamp) \ + Logger/$(DEPDIR)/$(am__dirstamp) +ProgramOptions/$(am__dirstamp): + @$(MKDIR_P) ProgramOptions + @: > ProgramOptions/$(am__dirstamp) +ProgramOptions/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ProgramOptions/$(DEPDIR) + @: > ProgramOptions/$(DEPDIR)/$(am__dirstamp) +ProgramOptions/program-options.$(OBJEXT): \ + ProgramOptions/$(am__dirstamp) \ + ProgramOptions/$(DEPDIR)/$(am__dirstamp) +QL/$(am__dirstamp): + @$(MKDIR_P) QL + @: > QL/$(am__dirstamp) +QL/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) QL/$(DEPDIR) + @: > QL/$(DEPDIR)/$(am__dirstamp) +QL/ast-query.$(OBJEXT): QL/$(am__dirstamp) \ + QL/$(DEPDIR)/$(am__dirstamp) +QL/formatter.$(OBJEXT): QL/$(am__dirstamp) \ + QL/$(DEPDIR)/$(am__dirstamp) +QL/optimize.$(OBJEXT): QL/$(am__dirstamp) QL/$(DEPDIR)/$(am__dirstamp) +QL/parser.$(OBJEXT): QL/$(am__dirstamp) QL/$(DEPDIR)/$(am__dirstamp) +QL/tokens.$(OBJEXT): QL/$(am__dirstamp) QL/$(DEPDIR)/$(am__dirstamp) +Rest/$(am__dirstamp): + @$(MKDIR_P) Rest + @: > Rest/$(am__dirstamp) +Rest/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) Rest/$(DEPDIR) + @: > Rest/$(DEPDIR)/$(am__dirstamp) +Rest/AddressPort.$(OBJEXT): Rest/$(am__dirstamp) \ + Rest/$(DEPDIR)/$(am__dirstamp) +Rest/AnyServer.$(OBJEXT): Rest/$(am__dirstamp) \ + Rest/$(DEPDIR)/$(am__dirstamp) +Rest/HttpRequest.$(OBJEXT): Rest/$(am__dirstamp) \ + Rest/$(DEPDIR)/$(am__dirstamp) +Rest/HttpResponse.$(OBJEXT): Rest/$(am__dirstamp) \ + Rest/$(DEPDIR)/$(am__dirstamp) +Rest/Initialise.$(OBJEXT): Rest/$(am__dirstamp) \ + Rest/$(DEPDIR)/$(am__dirstamp) +Rest/SslInterface.$(OBJEXT): Rest/$(am__dirstamp) \ + Rest/$(DEPDIR)/$(am__dirstamp) +Rest/Url.$(OBJEXT): Rest/$(am__dirstamp) \ + Rest/$(DEPDIR)/$(am__dirstamp) RestHandler/$(am__dirstamp): @$(MKDIR_P) RestHandler @: > RestHandler/$(am__dirstamp) RestHandler/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) RestHandler/$(DEPDIR) @: > RestHandler/$(DEPDIR)/$(am__dirstamp) -RestHandler/avocado-RestActionHandler.$(OBJEXT): \ +RestHandler/RestActionHandler.$(OBJEXT): RestHandler/$(am__dirstamp) \ + RestHandler/$(DEPDIR)/$(am__dirstamp) +RestHandler/RestCollectionHandler.$(OBJEXT): \ RestHandler/$(am__dirstamp) \ RestHandler/$(DEPDIR)/$(am__dirstamp) -RestHandler/avocado-RestDocumentHandler.$(OBJEXT): \ +RestHandler/RestSystemActionHandler.$(OBJEXT): \ RestHandler/$(am__dirstamp) \ RestHandler/$(DEPDIR)/$(am__dirstamp) -RestHandler/avocado-RestSystemActionHandler.$(OBJEXT): \ - RestHandler/$(am__dirstamp) \ - RestHandler/$(DEPDIR)/$(am__dirstamp) -RestHandler/avocado-RestVocbaseBaseHandler.$(OBJEXT): \ +RestHandler/RestVocbaseBaseHandler.$(OBJEXT): \ RestHandler/$(am__dirstamp) \ RestHandler/$(DEPDIR)/$(am__dirstamp) RestServer/$(am__dirstamp): @@ -1502,388 +1214,587 @@ RestServer/$(am__dirstamp): RestServer/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) RestServer/$(DEPDIR) @: > RestServer/$(DEPDIR)/$(am__dirstamp) -RestServer/avocado-ActionDispatcherThread.$(OBJEXT): \ +RestServer/ActionDispatcherThread.$(OBJEXT): \ RestServer/$(am__dirstamp) \ RestServer/$(DEPDIR)/$(am__dirstamp) -RestServer/avocado-AvocadoHttpServer.$(OBJEXT): \ +RestServer/AvocadoHttpServer.$(OBJEXT): RestServer/$(am__dirstamp) \ + RestServer/$(DEPDIR)/$(am__dirstamp) +RestServer/AvocadoServer.$(OBJEXT): RestServer/$(am__dirstamp) \ + RestServer/$(DEPDIR)/$(am__dirstamp) +RestServer/JSLoader.$(OBJEXT): RestServer/$(am__dirstamp) \ + RestServer/$(DEPDIR)/$(am__dirstamp) +RestServer/SystemActionDispatcherThread.$(OBJEXT): \ RestServer/$(am__dirstamp) \ RestServer/$(DEPDIR)/$(am__dirstamp) -RestServer/avocado-AvocadoServer.$(OBJEXT): \ - RestServer/$(am__dirstamp) \ - RestServer/$(DEPDIR)/$(am__dirstamp) -RestServer/avocado-JSLoader.$(OBJEXT): RestServer/$(am__dirstamp) \ - RestServer/$(DEPDIR)/$(am__dirstamp) -RestServer/avocado-SystemActionDispatcherThread.$(OBJEXT): \ - RestServer/$(am__dirstamp) \ - RestServer/$(DEPDIR)/$(am__dirstamp) -RestServer/avocado-avocado.$(OBJEXT): RestServer/$(am__dirstamp) \ +RestServer/avocado.$(OBJEXT): RestServer/$(am__dirstamp) \ RestServer/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/$(am__dirstamp): + @$(MKDIR_P) ResultGenerator + @: > ResultGenerator/$(am__dirstamp) +ResultGenerator/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ResultGenerator/$(DEPDIR) + @: > ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/HtmlResultGenerator.$(OBJEXT): \ + ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/Initialise.$(OBJEXT): ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/JsonResultGenerator.$(OBJEXT): \ + ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/JsonXResultGenerator.$(OBJEXT): \ + ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/OutputGenerator.$(OBJEXT): \ + ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/PhpResultGenerator.$(OBJEXT): \ + ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/ResultGenerator.$(OBJEXT): \ + ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +ResultGenerator/XmlResultGenerator.$(OBJEXT): \ + ResultGenerator/$(am__dirstamp) \ + ResultGenerator/$(DEPDIR)/$(am__dirstamp) +Scheduler/$(am__dirstamp): + @$(MKDIR_P) Scheduler + @: > Scheduler/$(am__dirstamp) +Scheduler/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) Scheduler/$(DEPDIR) + @: > Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/AsyncTask.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/ConnectionTask.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/ListenTask.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/PeriodicTask.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/Scheduler.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/SchedulerLibev.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/SchedulerThread.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/SignalTask.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/SocketTask.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/Task.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +Scheduler/TimerTask.$(OBJEXT): Scheduler/$(am__dirstamp) \ + Scheduler/$(DEPDIR)/$(am__dirstamp) +ShapedJson/$(am__dirstamp): + @$(MKDIR_P) ShapedJson + @: > ShapedJson/$(am__dirstamp) +ShapedJson/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ShapedJson/$(DEPDIR) + @: > ShapedJson/$(DEPDIR)/$(am__dirstamp) +ShapedJson/json-shaper.$(OBJEXT): ShapedJson/$(am__dirstamp) \ + ShapedJson/$(DEPDIR)/$(am__dirstamp) +ShapedJson/shape-accessor.$(OBJEXT): ShapedJson/$(am__dirstamp) \ + ShapedJson/$(DEPDIR)/$(am__dirstamp) +ShapedJson/shaped-json.$(OBJEXT): ShapedJson/$(am__dirstamp) \ + ShapedJson/$(DEPDIR)/$(am__dirstamp) +SkipLists/$(am__dirstamp): + @$(MKDIR_P) SkipLists + @: > SkipLists/$(am__dirstamp) +SkipLists/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) SkipLists/$(DEPDIR) + @: > SkipLists/$(DEPDIR)/$(am__dirstamp) +SkipLists/skiplist.$(OBJEXT): SkipLists/$(am__dirstamp) \ + SkipLists/$(DEPDIR)/$(am__dirstamp) +SkipLists/skiplistIndex.$(OBJEXT): SkipLists/$(am__dirstamp) \ + SkipLists/$(DEPDIR)/$(am__dirstamp) +V8/$(am__dirstamp): + @$(MKDIR_P) V8 + @: > V8/$(am__dirstamp) +V8/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) V8/$(DEPDIR) + @: > V8/$(DEPDIR)/$(am__dirstamp) +V8/v8-actions.$(OBJEXT): V8/$(am__dirstamp) \ + V8/$(DEPDIR)/$(am__dirstamp) +V8/v8-conv.$(OBJEXT): V8/$(am__dirstamp) V8/$(DEPDIR)/$(am__dirstamp) +V8/v8-json.$(OBJEXT): V8/$(am__dirstamp) V8/$(DEPDIR)/$(am__dirstamp) +V8/v8-line-editor.$(OBJEXT): V8/$(am__dirstamp) \ + V8/$(DEPDIR)/$(am__dirstamp) +V8/v8-shell.$(OBJEXT): V8/$(am__dirstamp) V8/$(DEPDIR)/$(am__dirstamp) +V8/v8-utils.$(OBJEXT): V8/$(am__dirstamp) V8/$(DEPDIR)/$(am__dirstamp) +V8/v8-vocbase.$(OBJEXT): V8/$(am__dirstamp) \ + V8/$(DEPDIR)/$(am__dirstamp) +Variant/$(am__dirstamp): + @$(MKDIR_P) Variant + @: > Variant/$(am__dirstamp) +Variant/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) Variant/$(DEPDIR) + @: > Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantArray.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantBlob.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantBoolean.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantDate.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantDatetime.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantDouble.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantFloat.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantInt16.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantInt32.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantInt64.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantInt8.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantMatrix2.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantNull.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantObject.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantString.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantUInt16.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantUInt32.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantUInt64.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantUInt8.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +Variant/VariantVector.$(OBJEXT): Variant/$(am__dirstamp) \ + Variant/$(DEPDIR)/$(am__dirstamp) +VocBase/$(am__dirstamp): + @$(MKDIR_P) VocBase + @: > VocBase/$(am__dirstamp) +VocBase/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) VocBase/$(DEPDIR) + @: > VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/barrier.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/blob-collection.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/collection.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/compactor.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/data-feeder.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/datafile.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/document-collection.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/headers.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/index.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/join-execute.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/join.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/order.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/query-base.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/query-error.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/query-javascript.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/query-node.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/query-parse.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/query.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/select-result.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/shadow-data.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/simple-collection.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/synchroniser.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/voc-shaper.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) +VocBase/vocbase.$(OBJEXT): VocBase/$(am__dirstamp) \ + VocBase/$(DEPDIR)/$(am__dirstamp) avocado$(EXEEXT): $(avocado_OBJECTS) $(avocado_DEPENDENCIES) @rm -f avocado$(EXEEXT) - $(AM_V_CXXLD)$(avocado_LINK) $(avocado_OBJECTS) $(avocado_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(avocado_OBJECTS) $(avocado_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f Admin/libavocadodb_a-ApplicationAdminServer.$(OBJEXT) - -rm -f Admin/libavocadodb_a-RestAdminBaseHandler.$(OBJEXT) - -rm -f Admin/libavocadodb_a-RestAdminFeConfigurationHandler.$(OBJEXT) - -rm -f Admin/libavocadodb_a-RestAdminLogHandler.$(OBJEXT) - -rm -f Admin/libavocadodb_a-RestBaseHandler.$(OBJEXT) - -rm -f Admin/libavocadodb_a-RestVersionHandler.$(OBJEXT) - -rm -f ApplicationServer/libavocadodb_a-ApplicationServer.$(OBJEXT) - -rm -f ApplicationServer/libavocadodb_a-ApplicationServerImpl.$(OBJEXT) - -rm -f ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.$(OBJEXT) - -rm -f Basics/libavocadodb_a-ConditionLocker.$(OBJEXT) - -rm -f Basics/libavocadodb_a-ConditionVariable.$(OBJEXT) - -rm -f Basics/libavocadodb_a-FileUtils.$(OBJEXT) - -rm -f Basics/libavocadodb_a-Initialise.$(OBJEXT) - -rm -f Basics/libavocadodb_a-LibraryLoader.$(OBJEXT) - -rm -f Basics/libavocadodb_a-Mutex.$(OBJEXT) - -rm -f Basics/libavocadodb_a-MutexLocker.$(OBJEXT) - -rm -f Basics/libavocadodb_a-ProgramOptions.$(OBJEXT) - -rm -f Basics/libavocadodb_a-ProgramOptionsDescription.$(OBJEXT) - -rm -f Basics/libavocadodb_a-Random.$(OBJEXT) - -rm -f Basics/libavocadodb_a-ReadLocker.$(OBJEXT) - -rm -f Basics/libavocadodb_a-ReadUnlocker.$(OBJEXT) - -rm -f Basics/libavocadodb_a-ReadWriteLock.$(OBJEXT) - -rm -f Basics/libavocadodb_a-StringUtils.$(OBJEXT) - -rm -f Basics/libavocadodb_a-Thread.$(OBJEXT) - -rm -f Basics/libavocadodb_a-Timing.$(OBJEXT) - -rm -f Basics/libavocadodb_a-WriteLocker.$(OBJEXT) - -rm -f Basics/libavocadodb_a-WriteUnlocker.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-associative-multi.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-associative.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-conversions.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-csv.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-error.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-files.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-hashes.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-init.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-json.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-locks-macos.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-locks-posix.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-logging.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-memory.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-process-utils.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-random.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-socket-utils.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-string-buffer.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-strings.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-structures.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-system-functions.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-terminal-utils-ncurses.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-terminal-utils.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-threads-posix.$(OBJEXT) - -rm -f BasicsC/libavocadodb_a-vector.$(OBJEXT) - -rm -f Dispatcher/libavocadodb_a-ApplicationServerDispatcher.$(OBJEXT) - -rm -f Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.$(OBJEXT) - -rm -f Dispatcher/libavocadodb_a-DispatcherImpl.$(OBJEXT) - -rm -f Dispatcher/libavocadodb_a-DispatcherQueue.$(OBJEXT) - -rm -f Dispatcher/libavocadodb_a-DispatcherThread.$(OBJEXT) - -rm -f Dispatcher/libavocadodb_a-Job.$(OBJEXT) - -rm -f GeneralServer/libavocadodb_a-GeneralFigures.$(OBJEXT) - -rm -f GeoIndex/libavocadodb_a-GeoIndex.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-ApplicationHttpServer.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-ApplicationHttpServerImpl.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-HttpCommTask.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-HttpHandler.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-HttpHandlerFactory.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-PathHandler.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-RedirectHandler.$(OBJEXT) - -rm -f HttpServer/libavocadodb_a-ServiceUnavailableHandler.$(OBJEXT) - -rm -f HttpsServer/libavocadodb_a-ApplicationHttpsServer.$(OBJEXT) - -rm -f HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.$(OBJEXT) - -rm -f HttpsServer/libavocadodb_a-HttpsAsyncCommTask.$(OBJEXT) - -rm -f HttpsServer/libavocadodb_a-HttpsServer.$(OBJEXT) - -rm -f HttpsServer/libavocadodb_a-HttpsServerImpl.$(OBJEXT) - -rm -f JsonParser/libavocadodb_a-json-parser.$(OBJEXT) - -rm -f JsonParserX/libavocadodb_a-InputParser.$(OBJEXT) - -rm -f JsonParserX/libavocadodb_a-JsonParserX.$(OBJEXT) - -rm -f JsonParserX/libavocadodb_a-JsonParserXDriver.$(OBJEXT) - -rm -f JsonParserX/libavocadodb_a-JsonScannerX.$(OBJEXT) - -rm -f Logger/libavocadodb_a-Logger.$(OBJEXT) - -rm -f Logger/libavocadodb_a-LoggerData.$(OBJEXT) - -rm -f Logger/libavocadodb_a-LoggerInfo.$(OBJEXT) - -rm -f Logger/libavocadodb_a-LoggerStream.$(OBJEXT) - -rm -f Logger/libavocadodb_a-LoggerTiming.$(OBJEXT) - -rm -f ProgramOptions/libavocadodb_a-program-options.$(OBJEXT) - -rm -f QL/libavocadodb_a-ParserWrapper.$(OBJEXT) - -rm -f QL/libavocadodb_a-ast-node.$(OBJEXT) - -rm -f QL/libavocadodb_a-ast-query.$(OBJEXT) - -rm -f QL/libavocadodb_a-error.$(OBJEXT) - -rm -f QL/libavocadodb_a-formatter.$(OBJEXT) - -rm -f QL/libavocadodb_a-javascripter.$(OBJEXT) - -rm -f QL/libavocadodb_a-optimize.$(OBJEXT) - -rm -f QL/libavocadodb_a-parser-context.$(OBJEXT) - -rm -f QL/libavocadodb_a-parser.$(OBJEXT) - -rm -f QL/libavocadodb_a-tokens.$(OBJEXT) - -rm -f Rest/libavocadodb_a-AddressPort.$(OBJEXT) - -rm -f Rest/libavocadodb_a-AnyServer.$(OBJEXT) - -rm -f Rest/libavocadodb_a-HttpRequest.$(OBJEXT) - -rm -f Rest/libavocadodb_a-HttpResponse.$(OBJEXT) - -rm -f Rest/libavocadodb_a-Initialise.$(OBJEXT) - -rm -f Rest/libavocadodb_a-SslInterface.$(OBJEXT) - -rm -f Rest/libavocadodb_a-Url.$(OBJEXT) - -rm -f RestHandler/avocado-RestActionHandler.$(OBJEXT) - -rm -f RestHandler/avocado-RestDocumentHandler.$(OBJEXT) - -rm -f RestHandler/avocado-RestSystemActionHandler.$(OBJEXT) - -rm -f RestHandler/avocado-RestVocbaseBaseHandler.$(OBJEXT) - -rm -f RestServer/avocado-ActionDispatcherThread.$(OBJEXT) - -rm -f RestServer/avocado-AvocadoHttpServer.$(OBJEXT) - -rm -f RestServer/avocado-AvocadoServer.$(OBJEXT) - -rm -f RestServer/avocado-JSLoader.$(OBJEXT) - -rm -f RestServer/avocado-SystemActionDispatcherThread.$(OBJEXT) - -rm -f RestServer/avocado-avocado.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-HtmlResultGenerator.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-Initialise.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-JsonResultGenerator.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-JsonXResultGenerator.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-OutputGenerator.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-PhpResultGenerator.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-ResultGenerator.$(OBJEXT) - -rm -f ResultGenerator/libavocadodb_a-XmlResultGenerator.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-AsyncTask.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-ConnectionTask.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-ListenTask.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-PeriodicTask.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-Scheduler.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-SchedulerLibev.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-SchedulerThread.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-SignalTask.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-SocketTask.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-Task.$(OBJEXT) - -rm -f Scheduler/libavocadodb_a-TimerTask.$(OBJEXT) - -rm -f ShapedJson/libavocadodb_a-json-shaper.$(OBJEXT) - -rm -f ShapedJson/libavocadodb_a-shape-accessor.$(OBJEXT) - -rm -f ShapedJson/libavocadodb_a-shaped-json.$(OBJEXT) - -rm -f V8/libavocadodb_a-v8-actions.$(OBJEXT) - -rm -f V8/libavocadodb_a-v8-conv.$(OBJEXT) - -rm -f V8/libavocadodb_a-v8-json.$(OBJEXT) - -rm -f V8/libavocadodb_a-v8-line-editor.$(OBJEXT) - -rm -f V8/libavocadodb_a-v8-shell.$(OBJEXT) - -rm -f V8/libavocadodb_a-v8-utils.$(OBJEXT) - -rm -f V8/libavocadodb_a-v8-vocbase.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantArray.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantBlob.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantBoolean.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantDate.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantDatetime.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantDouble.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantFloat.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantInt16.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantInt32.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantInt64.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantInt8.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantMatrix2.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantNull.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantObject.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantString.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantUInt16.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantUInt32.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantUInt64.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantUInt8.$(OBJEXT) - -rm -f Variant/libavocadodb_a-VariantVector.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-blob-collection.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-collection.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-compactor.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-data-feeder.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-datafile.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-document-collection.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-fluent-query.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-headers.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-index.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-join-execute.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-join.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-order.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-query.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-result-set.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-select-result.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-simple-collection.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-synchroniser.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-voc-shaper.$(OBJEXT) - -rm -f VocBase/libavocadodb_a-vocbase.$(OBJEXT) + -rm -f Admin/ApplicationAdminServer.$(OBJEXT) + -rm -f Admin/RestAdminBaseHandler.$(OBJEXT) + -rm -f Admin/RestAdminFeConfigurationHandler.$(OBJEXT) + -rm -f Admin/RestAdminLogHandler.$(OBJEXT) + -rm -f Admin/RestBaseHandler.$(OBJEXT) + -rm -f Admin/RestVersionHandler.$(OBJEXT) + -rm -f ApplicationServer/ApplicationServer.$(OBJEXT) + -rm -f ApplicationServer/ApplicationServerImpl.$(OBJEXT) + -rm -f ApplicationServer/ApplicationServerSchedulerImpl.$(OBJEXT) + -rm -f Basics/ConditionLocker.$(OBJEXT) + -rm -f Basics/ConditionVariable.$(OBJEXT) + -rm -f Basics/FileUtils.$(OBJEXT) + -rm -f Basics/Initialise.$(OBJEXT) + -rm -f Basics/LibraryLoader.$(OBJEXT) + -rm -f Basics/Mutex.$(OBJEXT) + -rm -f Basics/MutexLocker.$(OBJEXT) + -rm -f Basics/ProgramOptions.$(OBJEXT) + -rm -f Basics/ProgramOptionsDescription.$(OBJEXT) + -rm -f Basics/Random.$(OBJEXT) + -rm -f Basics/ReadLocker.$(OBJEXT) + -rm -f Basics/ReadUnlocker.$(OBJEXT) + -rm -f Basics/ReadWriteLock.$(OBJEXT) + -rm -f Basics/StringUtils.$(OBJEXT) + -rm -f Basics/Thread.$(OBJEXT) + -rm -f Basics/Timing.$(OBJEXT) + -rm -f Basics/WriteLocker.$(OBJEXT) + -rm -f Basics/WriteUnlocker.$(OBJEXT) + -rm -f BasicsC/associative-multi.$(OBJEXT) + -rm -f BasicsC/associative.$(OBJEXT) + -rm -f BasicsC/conversions.$(OBJEXT) + -rm -f BasicsC/csv.$(OBJEXT) + -rm -f BasicsC/error.$(OBJEXT) + -rm -f BasicsC/files.$(OBJEXT) + -rm -f BasicsC/hashes.$(OBJEXT) + -rm -f BasicsC/init.$(OBJEXT) + -rm -f BasicsC/json.$(OBJEXT) + -rm -f BasicsC/locks-macos.$(OBJEXT) + -rm -f BasicsC/locks-posix.$(OBJEXT) + -rm -f BasicsC/logging.$(OBJEXT) + -rm -f BasicsC/memory.$(OBJEXT) + -rm -f BasicsC/process-utils.$(OBJEXT) + -rm -f BasicsC/random.$(OBJEXT) + -rm -f BasicsC/socket-utils.$(OBJEXT) + -rm -f BasicsC/string-buffer.$(OBJEXT) + -rm -f BasicsC/strings.$(OBJEXT) + -rm -f BasicsC/structures.$(OBJEXT) + -rm -f BasicsC/system-functions.$(OBJEXT) + -rm -f BasicsC/terminal-utils-ncurses.$(OBJEXT) + -rm -f BasicsC/terminal-utils.$(OBJEXT) + -rm -f BasicsC/threads-posix.$(OBJEXT) + -rm -f BasicsC/vector.$(OBJEXT) + -rm -f Dispatcher/ApplicationServerDispatcher.$(OBJEXT) + -rm -f Dispatcher/ApplicationServerDispatcherImpl.$(OBJEXT) + -rm -f Dispatcher/DispatcherImpl.$(OBJEXT) + -rm -f Dispatcher/DispatcherQueue.$(OBJEXT) + -rm -f Dispatcher/DispatcherThread.$(OBJEXT) + -rm -f Dispatcher/Job.$(OBJEXT) + -rm -f GeneralServer/GeneralFigures.$(OBJEXT) + -rm -f GeoIndex/GeoIndex.$(OBJEXT) + -rm -f HashIndex/hashindex.$(OBJEXT) + -rm -f HttpServer/ApplicationHttpServer.$(OBJEXT) + -rm -f HttpServer/ApplicationHttpServerImpl.$(OBJEXT) + -rm -f HttpServer/HttpCommTask.$(OBJEXT) + -rm -f HttpServer/HttpHandler.$(OBJEXT) + -rm -f HttpServer/HttpHandlerFactory.$(OBJEXT) + -rm -f HttpServer/PathHandler.$(OBJEXT) + -rm -f HttpServer/RedirectHandler.$(OBJEXT) + -rm -f HttpServer/ServiceUnavailableHandler.$(OBJEXT) + -rm -f HttpsServer/ApplicationHttpsServer.$(OBJEXT) + -rm -f HttpsServer/ApplicationHttpsServerImpl.$(OBJEXT) + -rm -f HttpsServer/HttpsAsyncCommTask.$(OBJEXT) + -rm -f HttpsServer/HttpsServer.$(OBJEXT) + -rm -f HttpsServer/HttpsServerImpl.$(OBJEXT) + -rm -f JsonParser/json-parser.$(OBJEXT) + -rm -f JsonParserX/InputParser.$(OBJEXT) + -rm -f JsonParserX/JsonParserX.$(OBJEXT) + -rm -f JsonParserX/JsonParserXDriver.$(OBJEXT) + -rm -f JsonParserX/JsonScannerX.$(OBJEXT) + -rm -f Logger/Logger.$(OBJEXT) + -rm -f Logger/LoggerData.$(OBJEXT) + -rm -f Logger/LoggerInfo.$(OBJEXT) + -rm -f Logger/LoggerStream.$(OBJEXT) + -rm -f Logger/LoggerTiming.$(OBJEXT) + -rm -f ProgramOptions/program-options.$(OBJEXT) + -rm -f QL/ast-query.$(OBJEXT) + -rm -f QL/formatter.$(OBJEXT) + -rm -f QL/optimize.$(OBJEXT) + -rm -f QL/parser.$(OBJEXT) + -rm -f QL/tokens.$(OBJEXT) + -rm -f Rest/AddressPort.$(OBJEXT) + -rm -f Rest/AnyServer.$(OBJEXT) + -rm -f Rest/HttpRequest.$(OBJEXT) + -rm -f Rest/HttpResponse.$(OBJEXT) + -rm -f Rest/Initialise.$(OBJEXT) + -rm -f Rest/SslInterface.$(OBJEXT) + -rm -f Rest/Url.$(OBJEXT) + -rm -f RestHandler/RestActionHandler.$(OBJEXT) + -rm -f RestHandler/RestCollectionHandler.$(OBJEXT) + -rm -f RestHandler/RestSystemActionHandler.$(OBJEXT) + -rm -f RestHandler/RestVocbaseBaseHandler.$(OBJEXT) + -rm -f RestServer/ActionDispatcherThread.$(OBJEXT) + -rm -f RestServer/AvocadoHttpServer.$(OBJEXT) + -rm -f RestServer/AvocadoServer.$(OBJEXT) + -rm -f RestServer/JSLoader.$(OBJEXT) + -rm -f RestServer/SystemActionDispatcherThread.$(OBJEXT) + -rm -f RestServer/avocado.$(OBJEXT) + -rm -f ResultGenerator/HtmlResultGenerator.$(OBJEXT) + -rm -f ResultGenerator/Initialise.$(OBJEXT) + -rm -f ResultGenerator/JsonResultGenerator.$(OBJEXT) + -rm -f ResultGenerator/JsonXResultGenerator.$(OBJEXT) + -rm -f ResultGenerator/OutputGenerator.$(OBJEXT) + -rm -f ResultGenerator/PhpResultGenerator.$(OBJEXT) + -rm -f ResultGenerator/ResultGenerator.$(OBJEXT) + -rm -f ResultGenerator/XmlResultGenerator.$(OBJEXT) + -rm -f Scheduler/AsyncTask.$(OBJEXT) + -rm -f Scheduler/ConnectionTask.$(OBJEXT) + -rm -f Scheduler/ListenTask.$(OBJEXT) + -rm -f Scheduler/PeriodicTask.$(OBJEXT) + -rm -f Scheduler/Scheduler.$(OBJEXT) + -rm -f Scheduler/SchedulerLibev.$(OBJEXT) + -rm -f Scheduler/SchedulerThread.$(OBJEXT) + -rm -f Scheduler/SignalTask.$(OBJEXT) + -rm -f Scheduler/SocketTask.$(OBJEXT) + -rm -f Scheduler/Task.$(OBJEXT) + -rm -f Scheduler/TimerTask.$(OBJEXT) + -rm -f ShapedJson/json-shaper.$(OBJEXT) + -rm -f ShapedJson/shape-accessor.$(OBJEXT) + -rm -f ShapedJson/shaped-json.$(OBJEXT) + -rm -f SkipLists/skiplist.$(OBJEXT) + -rm -f SkipLists/skiplistIndex.$(OBJEXT) + -rm -f V8/v8-actions.$(OBJEXT) + -rm -f V8/v8-conv.$(OBJEXT) + -rm -f V8/v8-json.$(OBJEXT) + -rm -f V8/v8-line-editor.$(OBJEXT) + -rm -f V8/v8-shell.$(OBJEXT) + -rm -f V8/v8-utils.$(OBJEXT) + -rm -f V8/v8-vocbase.$(OBJEXT) + -rm -f Variant/VariantArray.$(OBJEXT) + -rm -f Variant/VariantBlob.$(OBJEXT) + -rm -f Variant/VariantBoolean.$(OBJEXT) + -rm -f Variant/VariantDate.$(OBJEXT) + -rm -f Variant/VariantDatetime.$(OBJEXT) + -rm -f Variant/VariantDouble.$(OBJEXT) + -rm -f Variant/VariantFloat.$(OBJEXT) + -rm -f Variant/VariantInt16.$(OBJEXT) + -rm -f Variant/VariantInt32.$(OBJEXT) + -rm -f Variant/VariantInt64.$(OBJEXT) + -rm -f Variant/VariantInt8.$(OBJEXT) + -rm -f Variant/VariantMatrix2.$(OBJEXT) + -rm -f Variant/VariantNull.$(OBJEXT) + -rm -f Variant/VariantObject.$(OBJEXT) + -rm -f Variant/VariantString.$(OBJEXT) + -rm -f Variant/VariantUInt16.$(OBJEXT) + -rm -f Variant/VariantUInt32.$(OBJEXT) + -rm -f Variant/VariantUInt64.$(OBJEXT) + -rm -f Variant/VariantUInt8.$(OBJEXT) + -rm -f Variant/VariantVector.$(OBJEXT) + -rm -f VocBase/barrier.$(OBJEXT) + -rm -f VocBase/blob-collection.$(OBJEXT) + -rm -f VocBase/collection.$(OBJEXT) + -rm -f VocBase/compactor.$(OBJEXT) + -rm -f VocBase/data-feeder.$(OBJEXT) + -rm -f VocBase/datafile.$(OBJEXT) + -rm -f VocBase/document-collection.$(OBJEXT) + -rm -f VocBase/headers.$(OBJEXT) + -rm -f VocBase/index.$(OBJEXT) + -rm -f VocBase/join-execute.$(OBJEXT) + -rm -f VocBase/join.$(OBJEXT) + -rm -f VocBase/order.$(OBJEXT) + -rm -f VocBase/query-base.$(OBJEXT) + -rm -f VocBase/query-error.$(OBJEXT) + -rm -f VocBase/query-javascript.$(OBJEXT) + -rm -f VocBase/query-node.$(OBJEXT) + -rm -f VocBase/query-parse.$(OBJEXT) + -rm -f VocBase/query.$(OBJEXT) + -rm -f VocBase/select-result.$(OBJEXT) + -rm -f VocBase/shadow-data.$(OBJEXT) + -rm -f VocBase/simple-collection.$(OBJEXT) + -rm -f VocBase/synchroniser.$(OBJEXT) + -rm -f VocBase/voc-shaper.$(OBJEXT) + -rm -f VocBase/vocbase.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/libavocadodb_a-ApplicationAdminServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/libavocadodb_a-RestAdminBaseHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/libavocadodb_a-RestAdminFeConfigurationHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/libavocadodb_a-RestAdminLogHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/libavocadodb_a-RestBaseHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/libavocadodb_a-RestVersionHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerImpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerSchedulerImpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-ConditionLocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-ConditionVariable.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-FileUtils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-Initialise.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-LibraryLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-Mutex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-MutexLocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-ProgramOptions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-ProgramOptionsDescription.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-Random.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-ReadLocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-ReadUnlocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-ReadWriteLock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-StringUtils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-Thread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-Timing.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-WriteLocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/libavocadodb_a-WriteUnlocker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-associative-multi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-associative.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-conversions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-csv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-files.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-hashes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-json.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-locks-macos.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-locks-posix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-logging.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-memory.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-process-utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-random.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-socket-utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-string-buffer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-strings.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-structures.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-system-functions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils-ncurses.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-threads-posix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/libavocadodb_a-vector.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcher.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcherImpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherImpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherQueue.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/libavocadodb_a-Job.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@GeneralServer/$(DEPDIR)/libavocadodb_a-GeneralFigures.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@GeoIndex/$(DEPDIR)/libavocadodb_a-GeoIndex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServerImpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-HttpCommTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandlerFactory.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-PathHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-RedirectHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/libavocadodb_a-ServiceUnavailableHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServerImpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsAsyncCommTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServerImpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@JsonParser/$(DEPDIR)/libavocadodb_a-json-parser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/libavocadodb_a-InputParser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserX.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserXDriver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/libavocadodb_a-JsonScannerX.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/libavocadodb_a-Logger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/libavocadodb_a-LoggerData.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/libavocadodb_a-LoggerInfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/libavocadodb_a-LoggerStream.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/libavocadodb_a-LoggerTiming.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ProgramOptions/$(DEPDIR)/libavocadodb_a-program-options.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-ParserWrapper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-ast-node.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-ast-query.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-formatter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-javascripter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-optimize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-parser-context.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-parser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/libavocadodb_a-tokens.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/libavocadodb_a-AddressPort.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/libavocadodb_a-AnyServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/libavocadodb_a-HttpRequest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/libavocadodb_a-HttpResponse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/libavocadodb_a-Initialise.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/libavocadodb_a-SslInterface.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/libavocadodb_a-Url.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/avocado-RestActionHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/avocado-RestDocumentHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/avocado-RestSystemActionHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/avocado-RestVocbaseBaseHandler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/avocado-ActionDispatcherThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/avocado-AvocadoHttpServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/avocado-AvocadoServer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/avocado-JSLoader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/avocado-SystemActionDispatcherThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/avocado-avocado.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-HtmlResultGenerator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-Initialise.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonResultGenerator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonXResultGenerator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-OutputGenerator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-PhpResultGenerator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-ResultGenerator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/libavocadodb_a-XmlResultGenerator.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-AsyncTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-ConnectionTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-ListenTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-PeriodicTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-Scheduler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerLibev.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerThread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-SignalTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-SocketTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-Task.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/libavocadodb_a-TimerTask.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ShapedJson/$(DEPDIR)/libavocadodb_a-json-shaper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ShapedJson/$(DEPDIR)/libavocadodb_a-shape-accessor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@ShapedJson/$(DEPDIR)/libavocadodb_a-shaped-json.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/libavocadodb_a-v8-actions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/libavocadodb_a-v8-conv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/libavocadodb_a-v8-json.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/libavocadodb_a-v8-line-editor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/libavocadodb_a-v8-shell.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/libavocadodb_a-v8-utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/libavocadodb_a-v8-vocbase.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantArray.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantBlob.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantBoolean.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantDate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantDatetime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantDouble.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantFloat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantInt16.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantInt32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantInt64.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantInt8.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantMatrix2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantNull.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantObject.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantString.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantUInt16.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantUInt32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantUInt64.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantUInt8.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/libavocadodb_a-VariantVector.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-blob-collection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-collection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-compactor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-data-feeder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-datafile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-document-collection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-fluent-query.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-headers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-index.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-join-execute.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-join.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-order.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-query.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-result-set.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-select-result.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-simple-collection.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-synchroniser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-voc-shaper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/libavocadodb_a-vocbase.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/ApplicationAdminServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/RestAdminBaseHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/RestAdminFeConfigurationHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/RestAdminLogHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/RestBaseHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Admin/$(DEPDIR)/RestVersionHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ApplicationServer/$(DEPDIR)/ApplicationServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ApplicationServer/$(DEPDIR)/ApplicationServerImpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ApplicationServer/$(DEPDIR)/ApplicationServerSchedulerImpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/ConditionLocker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/ConditionVariable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/FileUtils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/Initialise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/LibraryLoader.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/Mutex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/MutexLocker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/ProgramOptions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/ProgramOptionsDescription.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/Random.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/ReadLocker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/ReadUnlocker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/ReadWriteLock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/StringUtils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/Thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/Timing.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/WriteLocker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Basics/$(DEPDIR)/WriteUnlocker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/associative-multi.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/associative.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/conversions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/csv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/files.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/hashes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/json.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/locks-macos.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/locks-posix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/logging.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/memory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/process-utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/random.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/socket-utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/string-buffer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/strings.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/structures.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/system-functions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/terminal-utils-ncurses.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/terminal-utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/threads-posix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@BasicsC/$(DEPDIR)/vector.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/ApplicationServerDispatcher.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/ApplicationServerDispatcherImpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/DispatcherImpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/DispatcherQueue.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/DispatcherThread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Dispatcher/$(DEPDIR)/Job.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@GeneralServer/$(DEPDIR)/GeneralFigures.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@GeoIndex/$(DEPDIR)/GeoIndex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HashIndex/$(DEPDIR)/hashindex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/ApplicationHttpServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/ApplicationHttpServerImpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/HttpCommTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/HttpHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/HttpHandlerFactory.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/PathHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/RedirectHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpServer/$(DEPDIR)/ServiceUnavailableHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/ApplicationHttpsServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/ApplicationHttpsServerImpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/HttpsAsyncCommTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/HttpsServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@HttpsServer/$(DEPDIR)/HttpsServerImpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@JsonParser/$(DEPDIR)/json-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/InputParser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/JsonParserX.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/JsonParserXDriver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@JsonParserX/$(DEPDIR)/JsonScannerX.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/Logger.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/LoggerData.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/LoggerInfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/LoggerStream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Logger/$(DEPDIR)/LoggerTiming.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ProgramOptions/$(DEPDIR)/program-options.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/ast-query.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/formatter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/optimize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@QL/$(DEPDIR)/tokens.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/AddressPort.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/AnyServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/HttpRequest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/HttpResponse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/Initialise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/SslInterface.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Rest/$(DEPDIR)/Url.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/RestActionHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/RestCollectionHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/RestSystemActionHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestHandler/$(DEPDIR)/RestVocbaseBaseHandler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/ActionDispatcherThread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/AvocadoHttpServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/AvocadoServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/JSLoader.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/SystemActionDispatcherThread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@RestServer/$(DEPDIR)/avocado.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/HtmlResultGenerator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/Initialise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/JsonResultGenerator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/JsonXResultGenerator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/OutputGenerator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/PhpResultGenerator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/ResultGenerator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ResultGenerator/$(DEPDIR)/XmlResultGenerator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/AsyncTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/ConnectionTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/ListenTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/PeriodicTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/Scheduler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/SchedulerLibev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/SchedulerThread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/SignalTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/SocketTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/Task.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Scheduler/$(DEPDIR)/TimerTask.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ShapedJson/$(DEPDIR)/json-shaper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ShapedJson/$(DEPDIR)/shape-accessor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@ShapedJson/$(DEPDIR)/shaped-json.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@SkipLists/$(DEPDIR)/skiplist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@SkipLists/$(DEPDIR)/skiplistIndex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/v8-actions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/v8-conv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/v8-json.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/v8-line-editor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/v8-shell.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/v8-utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@V8/$(DEPDIR)/v8-vocbase.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantArray.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantBlob.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantBoolean.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantDate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantDatetime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantDouble.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantFloat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantInt16.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantInt32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantInt64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantInt8.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantMatrix2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantNull.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantObject.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantString.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantUInt16.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantUInt32.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantUInt64.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantUInt8.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@Variant/$(DEPDIR)/VariantVector.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/barrier.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/blob-collection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/collection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/compactor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/data-feeder.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/datafile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/document-collection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/headers.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/index.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/join-execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/join.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/order.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/query-base.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/query-error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/query-javascript.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/query-node.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/query-parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/query.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/select-result.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/shadow-data.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/simple-collection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/synchroniser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/voc-shaper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@VocBase/$(DEPDIR)/vocbase.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -1903,934 +1814,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -BasicsC/libavocadodb_a-associative-multi.o: BasicsC/associative-multi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-associative-multi.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-associative-multi.Tpo -c -o BasicsC/libavocadodb_a-associative-multi.o `test -f 'BasicsC/associative-multi.c' || echo '$(srcdir)/'`BasicsC/associative-multi.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-associative-multi.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-associative-multi.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/associative-multi.c' object='BasicsC/libavocadodb_a-associative-multi.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-associative-multi.o `test -f 'BasicsC/associative-multi.c' || echo '$(srcdir)/'`BasicsC/associative-multi.c - -BasicsC/libavocadodb_a-associative-multi.obj: BasicsC/associative-multi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-associative-multi.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-associative-multi.Tpo -c -o BasicsC/libavocadodb_a-associative-multi.obj `if test -f 'BasicsC/associative-multi.c'; then $(CYGPATH_W) 'BasicsC/associative-multi.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/associative-multi.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-associative-multi.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-associative-multi.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/associative-multi.c' object='BasicsC/libavocadodb_a-associative-multi.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-associative-multi.obj `if test -f 'BasicsC/associative-multi.c'; then $(CYGPATH_W) 'BasicsC/associative-multi.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/associative-multi.c'; fi` - -BasicsC/libavocadodb_a-associative.o: BasicsC/associative.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-associative.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-associative.Tpo -c -o BasicsC/libavocadodb_a-associative.o `test -f 'BasicsC/associative.c' || echo '$(srcdir)/'`BasicsC/associative.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-associative.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-associative.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/associative.c' object='BasicsC/libavocadodb_a-associative.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-associative.o `test -f 'BasicsC/associative.c' || echo '$(srcdir)/'`BasicsC/associative.c - -BasicsC/libavocadodb_a-associative.obj: BasicsC/associative.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-associative.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-associative.Tpo -c -o BasicsC/libavocadodb_a-associative.obj `if test -f 'BasicsC/associative.c'; then $(CYGPATH_W) 'BasicsC/associative.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/associative.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-associative.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-associative.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/associative.c' object='BasicsC/libavocadodb_a-associative.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-associative.obj `if test -f 'BasicsC/associative.c'; then $(CYGPATH_W) 'BasicsC/associative.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/associative.c'; fi` - -BasicsC/libavocadodb_a-conversions.o: BasicsC/conversions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-conversions.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-conversions.Tpo -c -o BasicsC/libavocadodb_a-conversions.o `test -f 'BasicsC/conversions.c' || echo '$(srcdir)/'`BasicsC/conversions.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-conversions.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-conversions.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/conversions.c' object='BasicsC/libavocadodb_a-conversions.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-conversions.o `test -f 'BasicsC/conversions.c' || echo '$(srcdir)/'`BasicsC/conversions.c - -BasicsC/libavocadodb_a-conversions.obj: BasicsC/conversions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-conversions.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-conversions.Tpo -c -o BasicsC/libavocadodb_a-conversions.obj `if test -f 'BasicsC/conversions.c'; then $(CYGPATH_W) 'BasicsC/conversions.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/conversions.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-conversions.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-conversions.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/conversions.c' object='BasicsC/libavocadodb_a-conversions.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-conversions.obj `if test -f 'BasicsC/conversions.c'; then $(CYGPATH_W) 'BasicsC/conversions.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/conversions.c'; fi` - -BasicsC/libavocadodb_a-csv.o: BasicsC/csv.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-csv.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-csv.Tpo -c -o BasicsC/libavocadodb_a-csv.o `test -f 'BasicsC/csv.c' || echo '$(srcdir)/'`BasicsC/csv.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-csv.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-csv.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/csv.c' object='BasicsC/libavocadodb_a-csv.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-csv.o `test -f 'BasicsC/csv.c' || echo '$(srcdir)/'`BasicsC/csv.c - -BasicsC/libavocadodb_a-csv.obj: BasicsC/csv.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-csv.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-csv.Tpo -c -o BasicsC/libavocadodb_a-csv.obj `if test -f 'BasicsC/csv.c'; then $(CYGPATH_W) 'BasicsC/csv.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/csv.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-csv.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-csv.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/csv.c' object='BasicsC/libavocadodb_a-csv.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-csv.obj `if test -f 'BasicsC/csv.c'; then $(CYGPATH_W) 'BasicsC/csv.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/csv.c'; fi` - -BasicsC/libavocadodb_a-error.o: BasicsC/error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-error.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-error.Tpo -c -o BasicsC/libavocadodb_a-error.o `test -f 'BasicsC/error.c' || echo '$(srcdir)/'`BasicsC/error.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-error.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-error.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/error.c' object='BasicsC/libavocadodb_a-error.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-error.o `test -f 'BasicsC/error.c' || echo '$(srcdir)/'`BasicsC/error.c - -BasicsC/libavocadodb_a-error.obj: BasicsC/error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-error.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-error.Tpo -c -o BasicsC/libavocadodb_a-error.obj `if test -f 'BasicsC/error.c'; then $(CYGPATH_W) 'BasicsC/error.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/error.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-error.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-error.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/error.c' object='BasicsC/libavocadodb_a-error.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-error.obj `if test -f 'BasicsC/error.c'; then $(CYGPATH_W) 'BasicsC/error.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/error.c'; fi` - -BasicsC/libavocadodb_a-files.o: BasicsC/files.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-files.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-files.Tpo -c -o BasicsC/libavocadodb_a-files.o `test -f 'BasicsC/files.c' || echo '$(srcdir)/'`BasicsC/files.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-files.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-files.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/files.c' object='BasicsC/libavocadodb_a-files.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-files.o `test -f 'BasicsC/files.c' || echo '$(srcdir)/'`BasicsC/files.c - -BasicsC/libavocadodb_a-files.obj: BasicsC/files.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-files.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-files.Tpo -c -o BasicsC/libavocadodb_a-files.obj `if test -f 'BasicsC/files.c'; then $(CYGPATH_W) 'BasicsC/files.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/files.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-files.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-files.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/files.c' object='BasicsC/libavocadodb_a-files.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-files.obj `if test -f 'BasicsC/files.c'; then $(CYGPATH_W) 'BasicsC/files.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/files.c'; fi` - -BasicsC/libavocadodb_a-hashes.o: BasicsC/hashes.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-hashes.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-hashes.Tpo -c -o BasicsC/libavocadodb_a-hashes.o `test -f 'BasicsC/hashes.c' || echo '$(srcdir)/'`BasicsC/hashes.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-hashes.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-hashes.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/hashes.c' object='BasicsC/libavocadodb_a-hashes.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-hashes.o `test -f 'BasicsC/hashes.c' || echo '$(srcdir)/'`BasicsC/hashes.c - -BasicsC/libavocadodb_a-hashes.obj: BasicsC/hashes.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-hashes.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-hashes.Tpo -c -o BasicsC/libavocadodb_a-hashes.obj `if test -f 'BasicsC/hashes.c'; then $(CYGPATH_W) 'BasicsC/hashes.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/hashes.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-hashes.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-hashes.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/hashes.c' object='BasicsC/libavocadodb_a-hashes.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-hashes.obj `if test -f 'BasicsC/hashes.c'; then $(CYGPATH_W) 'BasicsC/hashes.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/hashes.c'; fi` - -BasicsC/libavocadodb_a-init.o: BasicsC/init.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-init.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-init.Tpo -c -o BasicsC/libavocadodb_a-init.o `test -f 'BasicsC/init.c' || echo '$(srcdir)/'`BasicsC/init.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-init.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-init.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/init.c' object='BasicsC/libavocadodb_a-init.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-init.o `test -f 'BasicsC/init.c' || echo '$(srcdir)/'`BasicsC/init.c - -BasicsC/libavocadodb_a-init.obj: BasicsC/init.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-init.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-init.Tpo -c -o BasicsC/libavocadodb_a-init.obj `if test -f 'BasicsC/init.c'; then $(CYGPATH_W) 'BasicsC/init.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/init.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-init.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-init.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/init.c' object='BasicsC/libavocadodb_a-init.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-init.obj `if test -f 'BasicsC/init.c'; then $(CYGPATH_W) 'BasicsC/init.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/init.c'; fi` - -BasicsC/libavocadodb_a-json.o: BasicsC/json.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-json.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-json.Tpo -c -o BasicsC/libavocadodb_a-json.o `test -f 'BasicsC/json.c' || echo '$(srcdir)/'`BasicsC/json.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-json.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-json.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/json.c' object='BasicsC/libavocadodb_a-json.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-json.o `test -f 'BasicsC/json.c' || echo '$(srcdir)/'`BasicsC/json.c - -BasicsC/libavocadodb_a-json.obj: BasicsC/json.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-json.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-json.Tpo -c -o BasicsC/libavocadodb_a-json.obj `if test -f 'BasicsC/json.c'; then $(CYGPATH_W) 'BasicsC/json.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/json.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-json.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-json.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/json.c' object='BasicsC/libavocadodb_a-json.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-json.obj `if test -f 'BasicsC/json.c'; then $(CYGPATH_W) 'BasicsC/json.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/json.c'; fi` - -BasicsC/libavocadodb_a-locks-macos.o: BasicsC/locks-macos.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-locks-macos.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-locks-macos.Tpo -c -o BasicsC/libavocadodb_a-locks-macos.o `test -f 'BasicsC/locks-macos.c' || echo '$(srcdir)/'`BasicsC/locks-macos.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-locks-macos.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-locks-macos.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/locks-macos.c' object='BasicsC/libavocadodb_a-locks-macos.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-locks-macos.o `test -f 'BasicsC/locks-macos.c' || echo '$(srcdir)/'`BasicsC/locks-macos.c - -BasicsC/libavocadodb_a-locks-macos.obj: BasicsC/locks-macos.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-locks-macos.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-locks-macos.Tpo -c -o BasicsC/libavocadodb_a-locks-macos.obj `if test -f 'BasicsC/locks-macos.c'; then $(CYGPATH_W) 'BasicsC/locks-macos.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/locks-macos.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-locks-macos.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-locks-macos.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/locks-macos.c' object='BasicsC/libavocadodb_a-locks-macos.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-locks-macos.obj `if test -f 'BasicsC/locks-macos.c'; then $(CYGPATH_W) 'BasicsC/locks-macos.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/locks-macos.c'; fi` - -BasicsC/libavocadodb_a-locks-posix.o: BasicsC/locks-posix.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-locks-posix.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-locks-posix.Tpo -c -o BasicsC/libavocadodb_a-locks-posix.o `test -f 'BasicsC/locks-posix.c' || echo '$(srcdir)/'`BasicsC/locks-posix.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-locks-posix.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-locks-posix.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/locks-posix.c' object='BasicsC/libavocadodb_a-locks-posix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-locks-posix.o `test -f 'BasicsC/locks-posix.c' || echo '$(srcdir)/'`BasicsC/locks-posix.c - -BasicsC/libavocadodb_a-locks-posix.obj: BasicsC/locks-posix.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-locks-posix.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-locks-posix.Tpo -c -o BasicsC/libavocadodb_a-locks-posix.obj `if test -f 'BasicsC/locks-posix.c'; then $(CYGPATH_W) 'BasicsC/locks-posix.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/locks-posix.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-locks-posix.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-locks-posix.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/locks-posix.c' object='BasicsC/libavocadodb_a-locks-posix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-locks-posix.obj `if test -f 'BasicsC/locks-posix.c'; then $(CYGPATH_W) 'BasicsC/locks-posix.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/locks-posix.c'; fi` - -BasicsC/libavocadodb_a-logging.o: BasicsC/logging.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-logging.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-logging.Tpo -c -o BasicsC/libavocadodb_a-logging.o `test -f 'BasicsC/logging.c' || echo '$(srcdir)/'`BasicsC/logging.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-logging.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-logging.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/logging.c' object='BasicsC/libavocadodb_a-logging.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-logging.o `test -f 'BasicsC/logging.c' || echo '$(srcdir)/'`BasicsC/logging.c - -BasicsC/libavocadodb_a-logging.obj: BasicsC/logging.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-logging.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-logging.Tpo -c -o BasicsC/libavocadodb_a-logging.obj `if test -f 'BasicsC/logging.c'; then $(CYGPATH_W) 'BasicsC/logging.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/logging.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-logging.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-logging.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/logging.c' object='BasicsC/libavocadodb_a-logging.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-logging.obj `if test -f 'BasicsC/logging.c'; then $(CYGPATH_W) 'BasicsC/logging.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/logging.c'; fi` - -BasicsC/libavocadodb_a-memory.o: BasicsC/memory.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-memory.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-memory.Tpo -c -o BasicsC/libavocadodb_a-memory.o `test -f 'BasicsC/memory.c' || echo '$(srcdir)/'`BasicsC/memory.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-memory.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-memory.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/memory.c' object='BasicsC/libavocadodb_a-memory.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-memory.o `test -f 'BasicsC/memory.c' || echo '$(srcdir)/'`BasicsC/memory.c - -BasicsC/libavocadodb_a-memory.obj: BasicsC/memory.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-memory.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-memory.Tpo -c -o BasicsC/libavocadodb_a-memory.obj `if test -f 'BasicsC/memory.c'; then $(CYGPATH_W) 'BasicsC/memory.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/memory.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-memory.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-memory.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/memory.c' object='BasicsC/libavocadodb_a-memory.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-memory.obj `if test -f 'BasicsC/memory.c'; then $(CYGPATH_W) 'BasicsC/memory.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/memory.c'; fi` - -BasicsC/libavocadodb_a-process-utils.o: BasicsC/process-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-process-utils.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-process-utils.Tpo -c -o BasicsC/libavocadodb_a-process-utils.o `test -f 'BasicsC/process-utils.c' || echo '$(srcdir)/'`BasicsC/process-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-process-utils.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-process-utils.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/process-utils.c' object='BasicsC/libavocadodb_a-process-utils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-process-utils.o `test -f 'BasicsC/process-utils.c' || echo '$(srcdir)/'`BasicsC/process-utils.c - -BasicsC/libavocadodb_a-process-utils.obj: BasicsC/process-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-process-utils.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-process-utils.Tpo -c -o BasicsC/libavocadodb_a-process-utils.obj `if test -f 'BasicsC/process-utils.c'; then $(CYGPATH_W) 'BasicsC/process-utils.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/process-utils.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-process-utils.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-process-utils.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/process-utils.c' object='BasicsC/libavocadodb_a-process-utils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-process-utils.obj `if test -f 'BasicsC/process-utils.c'; then $(CYGPATH_W) 'BasicsC/process-utils.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/process-utils.c'; fi` - -BasicsC/libavocadodb_a-random.o: BasicsC/random.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-random.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-random.Tpo -c -o BasicsC/libavocadodb_a-random.o `test -f 'BasicsC/random.c' || echo '$(srcdir)/'`BasicsC/random.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-random.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-random.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/random.c' object='BasicsC/libavocadodb_a-random.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-random.o `test -f 'BasicsC/random.c' || echo '$(srcdir)/'`BasicsC/random.c - -BasicsC/libavocadodb_a-random.obj: BasicsC/random.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-random.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-random.Tpo -c -o BasicsC/libavocadodb_a-random.obj `if test -f 'BasicsC/random.c'; then $(CYGPATH_W) 'BasicsC/random.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/random.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-random.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-random.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/random.c' object='BasicsC/libavocadodb_a-random.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-random.obj `if test -f 'BasicsC/random.c'; then $(CYGPATH_W) 'BasicsC/random.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/random.c'; fi` - -BasicsC/libavocadodb_a-socket-utils.o: BasicsC/socket-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-socket-utils.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-socket-utils.Tpo -c -o BasicsC/libavocadodb_a-socket-utils.o `test -f 'BasicsC/socket-utils.c' || echo '$(srcdir)/'`BasicsC/socket-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-socket-utils.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-socket-utils.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/socket-utils.c' object='BasicsC/libavocadodb_a-socket-utils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-socket-utils.o `test -f 'BasicsC/socket-utils.c' || echo '$(srcdir)/'`BasicsC/socket-utils.c - -BasicsC/libavocadodb_a-socket-utils.obj: BasicsC/socket-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-socket-utils.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-socket-utils.Tpo -c -o BasicsC/libavocadodb_a-socket-utils.obj `if test -f 'BasicsC/socket-utils.c'; then $(CYGPATH_W) 'BasicsC/socket-utils.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/socket-utils.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-socket-utils.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-socket-utils.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/socket-utils.c' object='BasicsC/libavocadodb_a-socket-utils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-socket-utils.obj `if test -f 'BasicsC/socket-utils.c'; then $(CYGPATH_W) 'BasicsC/socket-utils.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/socket-utils.c'; fi` - -BasicsC/libavocadodb_a-string-buffer.o: BasicsC/string-buffer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-string-buffer.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-string-buffer.Tpo -c -o BasicsC/libavocadodb_a-string-buffer.o `test -f 'BasicsC/string-buffer.c' || echo '$(srcdir)/'`BasicsC/string-buffer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-string-buffer.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-string-buffer.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/string-buffer.c' object='BasicsC/libavocadodb_a-string-buffer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-string-buffer.o `test -f 'BasicsC/string-buffer.c' || echo '$(srcdir)/'`BasicsC/string-buffer.c - -BasicsC/libavocadodb_a-string-buffer.obj: BasicsC/string-buffer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-string-buffer.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-string-buffer.Tpo -c -o BasicsC/libavocadodb_a-string-buffer.obj `if test -f 'BasicsC/string-buffer.c'; then $(CYGPATH_W) 'BasicsC/string-buffer.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/string-buffer.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-string-buffer.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-string-buffer.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/string-buffer.c' object='BasicsC/libavocadodb_a-string-buffer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-string-buffer.obj `if test -f 'BasicsC/string-buffer.c'; then $(CYGPATH_W) 'BasicsC/string-buffer.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/string-buffer.c'; fi` - -BasicsC/libavocadodb_a-strings.o: BasicsC/strings.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-strings.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-strings.Tpo -c -o BasicsC/libavocadodb_a-strings.o `test -f 'BasicsC/strings.c' || echo '$(srcdir)/'`BasicsC/strings.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-strings.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-strings.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/strings.c' object='BasicsC/libavocadodb_a-strings.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-strings.o `test -f 'BasicsC/strings.c' || echo '$(srcdir)/'`BasicsC/strings.c - -BasicsC/libavocadodb_a-strings.obj: BasicsC/strings.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-strings.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-strings.Tpo -c -o BasicsC/libavocadodb_a-strings.obj `if test -f 'BasicsC/strings.c'; then $(CYGPATH_W) 'BasicsC/strings.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/strings.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-strings.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-strings.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/strings.c' object='BasicsC/libavocadodb_a-strings.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-strings.obj `if test -f 'BasicsC/strings.c'; then $(CYGPATH_W) 'BasicsC/strings.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/strings.c'; fi` - -BasicsC/libavocadodb_a-structures.o: BasicsC/structures.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-structures.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-structures.Tpo -c -o BasicsC/libavocadodb_a-structures.o `test -f 'BasicsC/structures.c' || echo '$(srcdir)/'`BasicsC/structures.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-structures.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-structures.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/structures.c' object='BasicsC/libavocadodb_a-structures.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-structures.o `test -f 'BasicsC/structures.c' || echo '$(srcdir)/'`BasicsC/structures.c - -BasicsC/libavocadodb_a-structures.obj: BasicsC/structures.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-structures.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-structures.Tpo -c -o BasicsC/libavocadodb_a-structures.obj `if test -f 'BasicsC/structures.c'; then $(CYGPATH_W) 'BasicsC/structures.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/structures.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-structures.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-structures.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/structures.c' object='BasicsC/libavocadodb_a-structures.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-structures.obj `if test -f 'BasicsC/structures.c'; then $(CYGPATH_W) 'BasicsC/structures.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/structures.c'; fi` - -BasicsC/libavocadodb_a-system-functions.o: BasicsC/system-functions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-system-functions.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-system-functions.Tpo -c -o BasicsC/libavocadodb_a-system-functions.o `test -f 'BasicsC/system-functions.c' || echo '$(srcdir)/'`BasicsC/system-functions.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-system-functions.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-system-functions.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/system-functions.c' object='BasicsC/libavocadodb_a-system-functions.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-system-functions.o `test -f 'BasicsC/system-functions.c' || echo '$(srcdir)/'`BasicsC/system-functions.c - -BasicsC/libavocadodb_a-system-functions.obj: BasicsC/system-functions.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-system-functions.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-system-functions.Tpo -c -o BasicsC/libavocadodb_a-system-functions.obj `if test -f 'BasicsC/system-functions.c'; then $(CYGPATH_W) 'BasicsC/system-functions.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/system-functions.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-system-functions.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-system-functions.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/system-functions.c' object='BasicsC/libavocadodb_a-system-functions.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-system-functions.obj `if test -f 'BasicsC/system-functions.c'; then $(CYGPATH_W) 'BasicsC/system-functions.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/system-functions.c'; fi` - -BasicsC/libavocadodb_a-terminal-utils-ncurses.o: BasicsC/terminal-utils-ncurses.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-terminal-utils-ncurses.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils-ncurses.Tpo -c -o BasicsC/libavocadodb_a-terminal-utils-ncurses.o `test -f 'BasicsC/terminal-utils-ncurses.c' || echo '$(srcdir)/'`BasicsC/terminal-utils-ncurses.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils-ncurses.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils-ncurses.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/terminal-utils-ncurses.c' object='BasicsC/libavocadodb_a-terminal-utils-ncurses.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-terminal-utils-ncurses.o `test -f 'BasicsC/terminal-utils-ncurses.c' || echo '$(srcdir)/'`BasicsC/terminal-utils-ncurses.c - -BasicsC/libavocadodb_a-terminal-utils-ncurses.obj: BasicsC/terminal-utils-ncurses.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-terminal-utils-ncurses.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils-ncurses.Tpo -c -o BasicsC/libavocadodb_a-terminal-utils-ncurses.obj `if test -f 'BasicsC/terminal-utils-ncurses.c'; then $(CYGPATH_W) 'BasicsC/terminal-utils-ncurses.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/terminal-utils-ncurses.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils-ncurses.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils-ncurses.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/terminal-utils-ncurses.c' object='BasicsC/libavocadodb_a-terminal-utils-ncurses.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-terminal-utils-ncurses.obj `if test -f 'BasicsC/terminal-utils-ncurses.c'; then $(CYGPATH_W) 'BasicsC/terminal-utils-ncurses.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/terminal-utils-ncurses.c'; fi` - -BasicsC/libavocadodb_a-terminal-utils.o: BasicsC/terminal-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-terminal-utils.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils.Tpo -c -o BasicsC/libavocadodb_a-terminal-utils.o `test -f 'BasicsC/terminal-utils.c' || echo '$(srcdir)/'`BasicsC/terminal-utils.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/terminal-utils.c' object='BasicsC/libavocadodb_a-terminal-utils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-terminal-utils.o `test -f 'BasicsC/terminal-utils.c' || echo '$(srcdir)/'`BasicsC/terminal-utils.c - -BasicsC/libavocadodb_a-terminal-utils.obj: BasicsC/terminal-utils.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-terminal-utils.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils.Tpo -c -o BasicsC/libavocadodb_a-terminal-utils.obj `if test -f 'BasicsC/terminal-utils.c'; then $(CYGPATH_W) 'BasicsC/terminal-utils.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/terminal-utils.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-terminal-utils.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/terminal-utils.c' object='BasicsC/libavocadodb_a-terminal-utils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-terminal-utils.obj `if test -f 'BasicsC/terminal-utils.c'; then $(CYGPATH_W) 'BasicsC/terminal-utils.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/terminal-utils.c'; fi` - -BasicsC/libavocadodb_a-threads-posix.o: BasicsC/threads-posix.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-threads-posix.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-threads-posix.Tpo -c -o BasicsC/libavocadodb_a-threads-posix.o `test -f 'BasicsC/threads-posix.c' || echo '$(srcdir)/'`BasicsC/threads-posix.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-threads-posix.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-threads-posix.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/threads-posix.c' object='BasicsC/libavocadodb_a-threads-posix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-threads-posix.o `test -f 'BasicsC/threads-posix.c' || echo '$(srcdir)/'`BasicsC/threads-posix.c - -BasicsC/libavocadodb_a-threads-posix.obj: BasicsC/threads-posix.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-threads-posix.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-threads-posix.Tpo -c -o BasicsC/libavocadodb_a-threads-posix.obj `if test -f 'BasicsC/threads-posix.c'; then $(CYGPATH_W) 'BasicsC/threads-posix.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/threads-posix.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-threads-posix.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-threads-posix.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/threads-posix.c' object='BasicsC/libavocadodb_a-threads-posix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-threads-posix.obj `if test -f 'BasicsC/threads-posix.c'; then $(CYGPATH_W) 'BasicsC/threads-posix.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/threads-posix.c'; fi` - -BasicsC/libavocadodb_a-vector.o: BasicsC/vector.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-vector.o -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-vector.Tpo -c -o BasicsC/libavocadodb_a-vector.o `test -f 'BasicsC/vector.c' || echo '$(srcdir)/'`BasicsC/vector.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-vector.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-vector.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/vector.c' object='BasicsC/libavocadodb_a-vector.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-vector.o `test -f 'BasicsC/vector.c' || echo '$(srcdir)/'`BasicsC/vector.c - -BasicsC/libavocadodb_a-vector.obj: BasicsC/vector.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT BasicsC/libavocadodb_a-vector.obj -MD -MP -MF BasicsC/$(DEPDIR)/libavocadodb_a-vector.Tpo -c -o BasicsC/libavocadodb_a-vector.obj `if test -f 'BasicsC/vector.c'; then $(CYGPATH_W) 'BasicsC/vector.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/vector.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) BasicsC/$(DEPDIR)/libavocadodb_a-vector.Tpo BasicsC/$(DEPDIR)/libavocadodb_a-vector.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BasicsC/vector.c' object='BasicsC/libavocadodb_a-vector.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o BasicsC/libavocadodb_a-vector.obj `if test -f 'BasicsC/vector.c'; then $(CYGPATH_W) 'BasicsC/vector.c'; else $(CYGPATH_W) '$(srcdir)/BasicsC/vector.c'; fi` - -GeoIndex/libavocadodb_a-GeoIndex.o: GeoIndex/GeoIndex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT GeoIndex/libavocadodb_a-GeoIndex.o -MD -MP -MF GeoIndex/$(DEPDIR)/libavocadodb_a-GeoIndex.Tpo -c -o GeoIndex/libavocadodb_a-GeoIndex.o `test -f 'GeoIndex/GeoIndex.c' || echo '$(srcdir)/'`GeoIndex/GeoIndex.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) GeoIndex/$(DEPDIR)/libavocadodb_a-GeoIndex.Tpo GeoIndex/$(DEPDIR)/libavocadodb_a-GeoIndex.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='GeoIndex/GeoIndex.c' object='GeoIndex/libavocadodb_a-GeoIndex.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o GeoIndex/libavocadodb_a-GeoIndex.o `test -f 'GeoIndex/GeoIndex.c' || echo '$(srcdir)/'`GeoIndex/GeoIndex.c - -GeoIndex/libavocadodb_a-GeoIndex.obj: GeoIndex/GeoIndex.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT GeoIndex/libavocadodb_a-GeoIndex.obj -MD -MP -MF GeoIndex/$(DEPDIR)/libavocadodb_a-GeoIndex.Tpo -c -o GeoIndex/libavocadodb_a-GeoIndex.obj `if test -f 'GeoIndex/GeoIndex.c'; then $(CYGPATH_W) 'GeoIndex/GeoIndex.c'; else $(CYGPATH_W) '$(srcdir)/GeoIndex/GeoIndex.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) GeoIndex/$(DEPDIR)/libavocadodb_a-GeoIndex.Tpo GeoIndex/$(DEPDIR)/libavocadodb_a-GeoIndex.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='GeoIndex/GeoIndex.c' object='GeoIndex/libavocadodb_a-GeoIndex.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o GeoIndex/libavocadodb_a-GeoIndex.obj `if test -f 'GeoIndex/GeoIndex.c'; then $(CYGPATH_W) 'GeoIndex/GeoIndex.c'; else $(CYGPATH_W) '$(srcdir)/GeoIndex/GeoIndex.c'; fi` - -JsonParser/libavocadodb_a-json-parser.o: JsonParser/json-parser.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT JsonParser/libavocadodb_a-json-parser.o -MD -MP -MF JsonParser/$(DEPDIR)/libavocadodb_a-json-parser.Tpo -c -o JsonParser/libavocadodb_a-json-parser.o `test -f 'JsonParser/json-parser.c' || echo '$(srcdir)/'`JsonParser/json-parser.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) JsonParser/$(DEPDIR)/libavocadodb_a-json-parser.Tpo JsonParser/$(DEPDIR)/libavocadodb_a-json-parser.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='JsonParser/json-parser.c' object='JsonParser/libavocadodb_a-json-parser.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o JsonParser/libavocadodb_a-json-parser.o `test -f 'JsonParser/json-parser.c' || echo '$(srcdir)/'`JsonParser/json-parser.c - -JsonParser/libavocadodb_a-json-parser.obj: JsonParser/json-parser.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT JsonParser/libavocadodb_a-json-parser.obj -MD -MP -MF JsonParser/$(DEPDIR)/libavocadodb_a-json-parser.Tpo -c -o JsonParser/libavocadodb_a-json-parser.obj `if test -f 'JsonParser/json-parser.c'; then $(CYGPATH_W) 'JsonParser/json-parser.c'; else $(CYGPATH_W) '$(srcdir)/JsonParser/json-parser.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) JsonParser/$(DEPDIR)/libavocadodb_a-json-parser.Tpo JsonParser/$(DEPDIR)/libavocadodb_a-json-parser.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='JsonParser/json-parser.c' object='JsonParser/libavocadodb_a-json-parser.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o JsonParser/libavocadodb_a-json-parser.obj `if test -f 'JsonParser/json-parser.c'; then $(CYGPATH_W) 'JsonParser/json-parser.c'; else $(CYGPATH_W) '$(srcdir)/JsonParser/json-parser.c'; fi` - -ProgramOptions/libavocadodb_a-program-options.o: ProgramOptions/program-options.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ProgramOptions/libavocadodb_a-program-options.o -MD -MP -MF ProgramOptions/$(DEPDIR)/libavocadodb_a-program-options.Tpo -c -o ProgramOptions/libavocadodb_a-program-options.o `test -f 'ProgramOptions/program-options.c' || echo '$(srcdir)/'`ProgramOptions/program-options.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ProgramOptions/$(DEPDIR)/libavocadodb_a-program-options.Tpo ProgramOptions/$(DEPDIR)/libavocadodb_a-program-options.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ProgramOptions/program-options.c' object='ProgramOptions/libavocadodb_a-program-options.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ProgramOptions/libavocadodb_a-program-options.o `test -f 'ProgramOptions/program-options.c' || echo '$(srcdir)/'`ProgramOptions/program-options.c - -ProgramOptions/libavocadodb_a-program-options.obj: ProgramOptions/program-options.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ProgramOptions/libavocadodb_a-program-options.obj -MD -MP -MF ProgramOptions/$(DEPDIR)/libavocadodb_a-program-options.Tpo -c -o ProgramOptions/libavocadodb_a-program-options.obj `if test -f 'ProgramOptions/program-options.c'; then $(CYGPATH_W) 'ProgramOptions/program-options.c'; else $(CYGPATH_W) '$(srcdir)/ProgramOptions/program-options.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ProgramOptions/$(DEPDIR)/libavocadodb_a-program-options.Tpo ProgramOptions/$(DEPDIR)/libavocadodb_a-program-options.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ProgramOptions/program-options.c' object='ProgramOptions/libavocadodb_a-program-options.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ProgramOptions/libavocadodb_a-program-options.obj `if test -f 'ProgramOptions/program-options.c'; then $(CYGPATH_W) 'ProgramOptions/program-options.c'; else $(CYGPATH_W) '$(srcdir)/ProgramOptions/program-options.c'; fi` - -ShapedJson/libavocadodb_a-json-shaper.o: ShapedJson/json-shaper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ShapedJson/libavocadodb_a-json-shaper.o -MD -MP -MF ShapedJson/$(DEPDIR)/libavocadodb_a-json-shaper.Tpo -c -o ShapedJson/libavocadodb_a-json-shaper.o `test -f 'ShapedJson/json-shaper.c' || echo '$(srcdir)/'`ShapedJson/json-shaper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ShapedJson/$(DEPDIR)/libavocadodb_a-json-shaper.Tpo ShapedJson/$(DEPDIR)/libavocadodb_a-json-shaper.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ShapedJson/json-shaper.c' object='ShapedJson/libavocadodb_a-json-shaper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ShapedJson/libavocadodb_a-json-shaper.o `test -f 'ShapedJson/json-shaper.c' || echo '$(srcdir)/'`ShapedJson/json-shaper.c - -ShapedJson/libavocadodb_a-json-shaper.obj: ShapedJson/json-shaper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ShapedJson/libavocadodb_a-json-shaper.obj -MD -MP -MF ShapedJson/$(DEPDIR)/libavocadodb_a-json-shaper.Tpo -c -o ShapedJson/libavocadodb_a-json-shaper.obj `if test -f 'ShapedJson/json-shaper.c'; then $(CYGPATH_W) 'ShapedJson/json-shaper.c'; else $(CYGPATH_W) '$(srcdir)/ShapedJson/json-shaper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ShapedJson/$(DEPDIR)/libavocadodb_a-json-shaper.Tpo ShapedJson/$(DEPDIR)/libavocadodb_a-json-shaper.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ShapedJson/json-shaper.c' object='ShapedJson/libavocadodb_a-json-shaper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ShapedJson/libavocadodb_a-json-shaper.obj `if test -f 'ShapedJson/json-shaper.c'; then $(CYGPATH_W) 'ShapedJson/json-shaper.c'; else $(CYGPATH_W) '$(srcdir)/ShapedJson/json-shaper.c'; fi` - -ShapedJson/libavocadodb_a-shape-accessor.o: ShapedJson/shape-accessor.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ShapedJson/libavocadodb_a-shape-accessor.o -MD -MP -MF ShapedJson/$(DEPDIR)/libavocadodb_a-shape-accessor.Tpo -c -o ShapedJson/libavocadodb_a-shape-accessor.o `test -f 'ShapedJson/shape-accessor.c' || echo '$(srcdir)/'`ShapedJson/shape-accessor.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ShapedJson/$(DEPDIR)/libavocadodb_a-shape-accessor.Tpo ShapedJson/$(DEPDIR)/libavocadodb_a-shape-accessor.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ShapedJson/shape-accessor.c' object='ShapedJson/libavocadodb_a-shape-accessor.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ShapedJson/libavocadodb_a-shape-accessor.o `test -f 'ShapedJson/shape-accessor.c' || echo '$(srcdir)/'`ShapedJson/shape-accessor.c - -ShapedJson/libavocadodb_a-shape-accessor.obj: ShapedJson/shape-accessor.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ShapedJson/libavocadodb_a-shape-accessor.obj -MD -MP -MF ShapedJson/$(DEPDIR)/libavocadodb_a-shape-accessor.Tpo -c -o ShapedJson/libavocadodb_a-shape-accessor.obj `if test -f 'ShapedJson/shape-accessor.c'; then $(CYGPATH_W) 'ShapedJson/shape-accessor.c'; else $(CYGPATH_W) '$(srcdir)/ShapedJson/shape-accessor.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ShapedJson/$(DEPDIR)/libavocadodb_a-shape-accessor.Tpo ShapedJson/$(DEPDIR)/libavocadodb_a-shape-accessor.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ShapedJson/shape-accessor.c' object='ShapedJson/libavocadodb_a-shape-accessor.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ShapedJson/libavocadodb_a-shape-accessor.obj `if test -f 'ShapedJson/shape-accessor.c'; then $(CYGPATH_W) 'ShapedJson/shape-accessor.c'; else $(CYGPATH_W) '$(srcdir)/ShapedJson/shape-accessor.c'; fi` - -ShapedJson/libavocadodb_a-shaped-json.o: ShapedJson/shaped-json.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ShapedJson/libavocadodb_a-shaped-json.o -MD -MP -MF ShapedJson/$(DEPDIR)/libavocadodb_a-shaped-json.Tpo -c -o ShapedJson/libavocadodb_a-shaped-json.o `test -f 'ShapedJson/shaped-json.c' || echo '$(srcdir)/'`ShapedJson/shaped-json.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ShapedJson/$(DEPDIR)/libavocadodb_a-shaped-json.Tpo ShapedJson/$(DEPDIR)/libavocadodb_a-shaped-json.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ShapedJson/shaped-json.c' object='ShapedJson/libavocadodb_a-shaped-json.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ShapedJson/libavocadodb_a-shaped-json.o `test -f 'ShapedJson/shaped-json.c' || echo '$(srcdir)/'`ShapedJson/shaped-json.c - -ShapedJson/libavocadodb_a-shaped-json.obj: ShapedJson/shaped-json.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ShapedJson/libavocadodb_a-shaped-json.obj -MD -MP -MF ShapedJson/$(DEPDIR)/libavocadodb_a-shaped-json.Tpo -c -o ShapedJson/libavocadodb_a-shaped-json.obj `if test -f 'ShapedJson/shaped-json.c'; then $(CYGPATH_W) 'ShapedJson/shaped-json.c'; else $(CYGPATH_W) '$(srcdir)/ShapedJson/shaped-json.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ShapedJson/$(DEPDIR)/libavocadodb_a-shaped-json.Tpo ShapedJson/$(DEPDIR)/libavocadodb_a-shaped-json.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ShapedJson/shaped-json.c' object='ShapedJson/libavocadodb_a-shaped-json.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ShapedJson/libavocadodb_a-shaped-json.obj `if test -f 'ShapedJson/shaped-json.c'; then $(CYGPATH_W) 'ShapedJson/shaped-json.c'; else $(CYGPATH_W) '$(srcdir)/ShapedJson/shaped-json.c'; fi` - -VocBase/libavocadodb_a-data-feeder.o: VocBase/data-feeder.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-data-feeder.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-data-feeder.Tpo -c -o VocBase/libavocadodb_a-data-feeder.o `test -f 'VocBase/data-feeder.c' || echo '$(srcdir)/'`VocBase/data-feeder.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-data-feeder.Tpo VocBase/$(DEPDIR)/libavocadodb_a-data-feeder.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/data-feeder.c' object='VocBase/libavocadodb_a-data-feeder.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-data-feeder.o `test -f 'VocBase/data-feeder.c' || echo '$(srcdir)/'`VocBase/data-feeder.c - -VocBase/libavocadodb_a-data-feeder.obj: VocBase/data-feeder.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-data-feeder.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-data-feeder.Tpo -c -o VocBase/libavocadodb_a-data-feeder.obj `if test -f 'VocBase/data-feeder.c'; then $(CYGPATH_W) 'VocBase/data-feeder.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/data-feeder.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-data-feeder.Tpo VocBase/$(DEPDIR)/libavocadodb_a-data-feeder.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/data-feeder.c' object='VocBase/libavocadodb_a-data-feeder.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-data-feeder.obj `if test -f 'VocBase/data-feeder.c'; then $(CYGPATH_W) 'VocBase/data-feeder.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/data-feeder.c'; fi` - -VocBase/libavocadodb_a-join-execute.o: VocBase/join-execute.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-join-execute.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-join-execute.Tpo -c -o VocBase/libavocadodb_a-join-execute.o `test -f 'VocBase/join-execute.c' || echo '$(srcdir)/'`VocBase/join-execute.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-join-execute.Tpo VocBase/$(DEPDIR)/libavocadodb_a-join-execute.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/join-execute.c' object='VocBase/libavocadodb_a-join-execute.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-join-execute.o `test -f 'VocBase/join-execute.c' || echo '$(srcdir)/'`VocBase/join-execute.c - -VocBase/libavocadodb_a-join-execute.obj: VocBase/join-execute.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-join-execute.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-join-execute.Tpo -c -o VocBase/libavocadodb_a-join-execute.obj `if test -f 'VocBase/join-execute.c'; then $(CYGPATH_W) 'VocBase/join-execute.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/join-execute.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-join-execute.Tpo VocBase/$(DEPDIR)/libavocadodb_a-join-execute.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/join-execute.c' object='VocBase/libavocadodb_a-join-execute.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-join-execute.obj `if test -f 'VocBase/join-execute.c'; then $(CYGPATH_W) 'VocBase/join-execute.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/join-execute.c'; fi` - -VocBase/libavocadodb_a-order.o: VocBase/order.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-order.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-order.Tpo -c -o VocBase/libavocadodb_a-order.o `test -f 'VocBase/order.c' || echo '$(srcdir)/'`VocBase/order.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-order.Tpo VocBase/$(DEPDIR)/libavocadodb_a-order.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/order.c' object='VocBase/libavocadodb_a-order.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-order.o `test -f 'VocBase/order.c' || echo '$(srcdir)/'`VocBase/order.c - -VocBase/libavocadodb_a-order.obj: VocBase/order.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-order.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-order.Tpo -c -o VocBase/libavocadodb_a-order.obj `if test -f 'VocBase/order.c'; then $(CYGPATH_W) 'VocBase/order.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/order.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-order.Tpo VocBase/$(DEPDIR)/libavocadodb_a-order.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/order.c' object='VocBase/libavocadodb_a-order.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-order.obj `if test -f 'VocBase/order.c'; then $(CYGPATH_W) 'VocBase/order.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/order.c'; fi` - -VocBase/libavocadodb_a-blob-collection.o: VocBase/blob-collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-blob-collection.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-blob-collection.Tpo -c -o VocBase/libavocadodb_a-blob-collection.o `test -f 'VocBase/blob-collection.c' || echo '$(srcdir)/'`VocBase/blob-collection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-blob-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-blob-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/blob-collection.c' object='VocBase/libavocadodb_a-blob-collection.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-blob-collection.o `test -f 'VocBase/blob-collection.c' || echo '$(srcdir)/'`VocBase/blob-collection.c - -VocBase/libavocadodb_a-blob-collection.obj: VocBase/blob-collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-blob-collection.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-blob-collection.Tpo -c -o VocBase/libavocadodb_a-blob-collection.obj `if test -f 'VocBase/blob-collection.c'; then $(CYGPATH_W) 'VocBase/blob-collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/blob-collection.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-blob-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-blob-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/blob-collection.c' object='VocBase/libavocadodb_a-blob-collection.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-blob-collection.obj `if test -f 'VocBase/blob-collection.c'; then $(CYGPATH_W) 'VocBase/blob-collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/blob-collection.c'; fi` - -VocBase/libavocadodb_a-collection.o: VocBase/collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-collection.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-collection.Tpo -c -o VocBase/libavocadodb_a-collection.o `test -f 'VocBase/collection.c' || echo '$(srcdir)/'`VocBase/collection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/collection.c' object='VocBase/libavocadodb_a-collection.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-collection.o `test -f 'VocBase/collection.c' || echo '$(srcdir)/'`VocBase/collection.c - -VocBase/libavocadodb_a-collection.obj: VocBase/collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-collection.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-collection.Tpo -c -o VocBase/libavocadodb_a-collection.obj `if test -f 'VocBase/collection.c'; then $(CYGPATH_W) 'VocBase/collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/collection.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/collection.c' object='VocBase/libavocadodb_a-collection.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-collection.obj `if test -f 'VocBase/collection.c'; then $(CYGPATH_W) 'VocBase/collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/collection.c'; fi` - -VocBase/libavocadodb_a-compactor.o: VocBase/compactor.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-compactor.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-compactor.Tpo -c -o VocBase/libavocadodb_a-compactor.o `test -f 'VocBase/compactor.c' || echo '$(srcdir)/'`VocBase/compactor.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-compactor.Tpo VocBase/$(DEPDIR)/libavocadodb_a-compactor.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/compactor.c' object='VocBase/libavocadodb_a-compactor.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-compactor.o `test -f 'VocBase/compactor.c' || echo '$(srcdir)/'`VocBase/compactor.c - -VocBase/libavocadodb_a-compactor.obj: VocBase/compactor.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-compactor.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-compactor.Tpo -c -o VocBase/libavocadodb_a-compactor.obj `if test -f 'VocBase/compactor.c'; then $(CYGPATH_W) 'VocBase/compactor.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/compactor.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-compactor.Tpo VocBase/$(DEPDIR)/libavocadodb_a-compactor.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/compactor.c' object='VocBase/libavocadodb_a-compactor.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-compactor.obj `if test -f 'VocBase/compactor.c'; then $(CYGPATH_W) 'VocBase/compactor.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/compactor.c'; fi` - -VocBase/libavocadodb_a-datafile.o: VocBase/datafile.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-datafile.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-datafile.Tpo -c -o VocBase/libavocadodb_a-datafile.o `test -f 'VocBase/datafile.c' || echo '$(srcdir)/'`VocBase/datafile.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-datafile.Tpo VocBase/$(DEPDIR)/libavocadodb_a-datafile.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/datafile.c' object='VocBase/libavocadodb_a-datafile.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-datafile.o `test -f 'VocBase/datafile.c' || echo '$(srcdir)/'`VocBase/datafile.c - -VocBase/libavocadodb_a-datafile.obj: VocBase/datafile.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-datafile.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-datafile.Tpo -c -o VocBase/libavocadodb_a-datafile.obj `if test -f 'VocBase/datafile.c'; then $(CYGPATH_W) 'VocBase/datafile.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/datafile.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-datafile.Tpo VocBase/$(DEPDIR)/libavocadodb_a-datafile.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/datafile.c' object='VocBase/libavocadodb_a-datafile.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-datafile.obj `if test -f 'VocBase/datafile.c'; then $(CYGPATH_W) 'VocBase/datafile.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/datafile.c'; fi` - -VocBase/libavocadodb_a-document-collection.o: VocBase/document-collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-document-collection.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-document-collection.Tpo -c -o VocBase/libavocadodb_a-document-collection.o `test -f 'VocBase/document-collection.c' || echo '$(srcdir)/'`VocBase/document-collection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-document-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-document-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/document-collection.c' object='VocBase/libavocadodb_a-document-collection.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-document-collection.o `test -f 'VocBase/document-collection.c' || echo '$(srcdir)/'`VocBase/document-collection.c - -VocBase/libavocadodb_a-document-collection.obj: VocBase/document-collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-document-collection.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-document-collection.Tpo -c -o VocBase/libavocadodb_a-document-collection.obj `if test -f 'VocBase/document-collection.c'; then $(CYGPATH_W) 'VocBase/document-collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/document-collection.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-document-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-document-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/document-collection.c' object='VocBase/libavocadodb_a-document-collection.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-document-collection.obj `if test -f 'VocBase/document-collection.c'; then $(CYGPATH_W) 'VocBase/document-collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/document-collection.c'; fi` - -VocBase/libavocadodb_a-fluent-query.o: VocBase/fluent-query.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-fluent-query.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-fluent-query.Tpo -c -o VocBase/libavocadodb_a-fluent-query.o `test -f 'VocBase/fluent-query.c' || echo '$(srcdir)/'`VocBase/fluent-query.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-fluent-query.Tpo VocBase/$(DEPDIR)/libavocadodb_a-fluent-query.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/fluent-query.c' object='VocBase/libavocadodb_a-fluent-query.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-fluent-query.o `test -f 'VocBase/fluent-query.c' || echo '$(srcdir)/'`VocBase/fluent-query.c - -VocBase/libavocadodb_a-fluent-query.obj: VocBase/fluent-query.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-fluent-query.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-fluent-query.Tpo -c -o VocBase/libavocadodb_a-fluent-query.obj `if test -f 'VocBase/fluent-query.c'; then $(CYGPATH_W) 'VocBase/fluent-query.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/fluent-query.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-fluent-query.Tpo VocBase/$(DEPDIR)/libavocadodb_a-fluent-query.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/fluent-query.c' object='VocBase/libavocadodb_a-fluent-query.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-fluent-query.obj `if test -f 'VocBase/fluent-query.c'; then $(CYGPATH_W) 'VocBase/fluent-query.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/fluent-query.c'; fi` - -VocBase/libavocadodb_a-select-result.o: VocBase/select-result.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-select-result.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-select-result.Tpo -c -o VocBase/libavocadodb_a-select-result.o `test -f 'VocBase/select-result.c' || echo '$(srcdir)/'`VocBase/select-result.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-select-result.Tpo VocBase/$(DEPDIR)/libavocadodb_a-select-result.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/select-result.c' object='VocBase/libavocadodb_a-select-result.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-select-result.o `test -f 'VocBase/select-result.c' || echo '$(srcdir)/'`VocBase/select-result.c - -VocBase/libavocadodb_a-select-result.obj: VocBase/select-result.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-select-result.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-select-result.Tpo -c -o VocBase/libavocadodb_a-select-result.obj `if test -f 'VocBase/select-result.c'; then $(CYGPATH_W) 'VocBase/select-result.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/select-result.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-select-result.Tpo VocBase/$(DEPDIR)/libavocadodb_a-select-result.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/select-result.c' object='VocBase/libavocadodb_a-select-result.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-select-result.obj `if test -f 'VocBase/select-result.c'; then $(CYGPATH_W) 'VocBase/select-result.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/select-result.c'; fi` - -VocBase/libavocadodb_a-join.o: VocBase/join.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-join.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-join.Tpo -c -o VocBase/libavocadodb_a-join.o `test -f 'VocBase/join.c' || echo '$(srcdir)/'`VocBase/join.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-join.Tpo VocBase/$(DEPDIR)/libavocadodb_a-join.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/join.c' object='VocBase/libavocadodb_a-join.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-join.o `test -f 'VocBase/join.c' || echo '$(srcdir)/'`VocBase/join.c - -VocBase/libavocadodb_a-join.obj: VocBase/join.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-join.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-join.Tpo -c -o VocBase/libavocadodb_a-join.obj `if test -f 'VocBase/join.c'; then $(CYGPATH_W) 'VocBase/join.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/join.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-join.Tpo VocBase/$(DEPDIR)/libavocadodb_a-join.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/join.c' object='VocBase/libavocadodb_a-join.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-join.obj `if test -f 'VocBase/join.c'; then $(CYGPATH_W) 'VocBase/join.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/join.c'; fi` - -VocBase/libavocadodb_a-query.o: VocBase/query.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-query.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-query.Tpo -c -o VocBase/libavocadodb_a-query.o `test -f 'VocBase/query.c' || echo '$(srcdir)/'`VocBase/query.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-query.Tpo VocBase/$(DEPDIR)/libavocadodb_a-query.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/query.c' object='VocBase/libavocadodb_a-query.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-query.o `test -f 'VocBase/query.c' || echo '$(srcdir)/'`VocBase/query.c - -VocBase/libavocadodb_a-query.obj: VocBase/query.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-query.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-query.Tpo -c -o VocBase/libavocadodb_a-query.obj `if test -f 'VocBase/query.c'; then $(CYGPATH_W) 'VocBase/query.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/query.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-query.Tpo VocBase/$(DEPDIR)/libavocadodb_a-query.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/query.c' object='VocBase/libavocadodb_a-query.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-query.obj `if test -f 'VocBase/query.c'; then $(CYGPATH_W) 'VocBase/query.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/query.c'; fi` - -VocBase/libavocadodb_a-headers.o: VocBase/headers.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-headers.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-headers.Tpo -c -o VocBase/libavocadodb_a-headers.o `test -f 'VocBase/headers.c' || echo '$(srcdir)/'`VocBase/headers.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-headers.Tpo VocBase/$(DEPDIR)/libavocadodb_a-headers.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/headers.c' object='VocBase/libavocadodb_a-headers.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-headers.o `test -f 'VocBase/headers.c' || echo '$(srcdir)/'`VocBase/headers.c - -VocBase/libavocadodb_a-headers.obj: VocBase/headers.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-headers.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-headers.Tpo -c -o VocBase/libavocadodb_a-headers.obj `if test -f 'VocBase/headers.c'; then $(CYGPATH_W) 'VocBase/headers.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/headers.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-headers.Tpo VocBase/$(DEPDIR)/libavocadodb_a-headers.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/headers.c' object='VocBase/libavocadodb_a-headers.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-headers.obj `if test -f 'VocBase/headers.c'; then $(CYGPATH_W) 'VocBase/headers.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/headers.c'; fi` - -VocBase/libavocadodb_a-index.o: VocBase/index.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-index.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-index.Tpo -c -o VocBase/libavocadodb_a-index.o `test -f 'VocBase/index.c' || echo '$(srcdir)/'`VocBase/index.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-index.Tpo VocBase/$(DEPDIR)/libavocadodb_a-index.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/index.c' object='VocBase/libavocadodb_a-index.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-index.o `test -f 'VocBase/index.c' || echo '$(srcdir)/'`VocBase/index.c - -VocBase/libavocadodb_a-index.obj: VocBase/index.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-index.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-index.Tpo -c -o VocBase/libavocadodb_a-index.obj `if test -f 'VocBase/index.c'; then $(CYGPATH_W) 'VocBase/index.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/index.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-index.Tpo VocBase/$(DEPDIR)/libavocadodb_a-index.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/index.c' object='VocBase/libavocadodb_a-index.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-index.obj `if test -f 'VocBase/index.c'; then $(CYGPATH_W) 'VocBase/index.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/index.c'; fi` - -VocBase/libavocadodb_a-result-set.o: VocBase/result-set.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-result-set.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-result-set.Tpo -c -o VocBase/libavocadodb_a-result-set.o `test -f 'VocBase/result-set.c' || echo '$(srcdir)/'`VocBase/result-set.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-result-set.Tpo VocBase/$(DEPDIR)/libavocadodb_a-result-set.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/result-set.c' object='VocBase/libavocadodb_a-result-set.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-result-set.o `test -f 'VocBase/result-set.c' || echo '$(srcdir)/'`VocBase/result-set.c - -VocBase/libavocadodb_a-result-set.obj: VocBase/result-set.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-result-set.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-result-set.Tpo -c -o VocBase/libavocadodb_a-result-set.obj `if test -f 'VocBase/result-set.c'; then $(CYGPATH_W) 'VocBase/result-set.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/result-set.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-result-set.Tpo VocBase/$(DEPDIR)/libavocadodb_a-result-set.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/result-set.c' object='VocBase/libavocadodb_a-result-set.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-result-set.obj `if test -f 'VocBase/result-set.c'; then $(CYGPATH_W) 'VocBase/result-set.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/result-set.c'; fi` - -VocBase/libavocadodb_a-simple-collection.o: VocBase/simple-collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-simple-collection.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-simple-collection.Tpo -c -o VocBase/libavocadodb_a-simple-collection.o `test -f 'VocBase/simple-collection.c' || echo '$(srcdir)/'`VocBase/simple-collection.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-simple-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-simple-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/simple-collection.c' object='VocBase/libavocadodb_a-simple-collection.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-simple-collection.o `test -f 'VocBase/simple-collection.c' || echo '$(srcdir)/'`VocBase/simple-collection.c - -VocBase/libavocadodb_a-simple-collection.obj: VocBase/simple-collection.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-simple-collection.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-simple-collection.Tpo -c -o VocBase/libavocadodb_a-simple-collection.obj `if test -f 'VocBase/simple-collection.c'; then $(CYGPATH_W) 'VocBase/simple-collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/simple-collection.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-simple-collection.Tpo VocBase/$(DEPDIR)/libavocadodb_a-simple-collection.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/simple-collection.c' object='VocBase/libavocadodb_a-simple-collection.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-simple-collection.obj `if test -f 'VocBase/simple-collection.c'; then $(CYGPATH_W) 'VocBase/simple-collection.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/simple-collection.c'; fi` - -VocBase/libavocadodb_a-synchroniser.o: VocBase/synchroniser.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-synchroniser.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-synchroniser.Tpo -c -o VocBase/libavocadodb_a-synchroniser.o `test -f 'VocBase/synchroniser.c' || echo '$(srcdir)/'`VocBase/synchroniser.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-synchroniser.Tpo VocBase/$(DEPDIR)/libavocadodb_a-synchroniser.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/synchroniser.c' object='VocBase/libavocadodb_a-synchroniser.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-synchroniser.o `test -f 'VocBase/synchroniser.c' || echo '$(srcdir)/'`VocBase/synchroniser.c - -VocBase/libavocadodb_a-synchroniser.obj: VocBase/synchroniser.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-synchroniser.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-synchroniser.Tpo -c -o VocBase/libavocadodb_a-synchroniser.obj `if test -f 'VocBase/synchroniser.c'; then $(CYGPATH_W) 'VocBase/synchroniser.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/synchroniser.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-synchroniser.Tpo VocBase/$(DEPDIR)/libavocadodb_a-synchroniser.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/synchroniser.c' object='VocBase/libavocadodb_a-synchroniser.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-synchroniser.obj `if test -f 'VocBase/synchroniser.c'; then $(CYGPATH_W) 'VocBase/synchroniser.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/synchroniser.c'; fi` - -VocBase/libavocadodb_a-voc-shaper.o: VocBase/voc-shaper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-voc-shaper.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-voc-shaper.Tpo -c -o VocBase/libavocadodb_a-voc-shaper.o `test -f 'VocBase/voc-shaper.c' || echo '$(srcdir)/'`VocBase/voc-shaper.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-voc-shaper.Tpo VocBase/$(DEPDIR)/libavocadodb_a-voc-shaper.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/voc-shaper.c' object='VocBase/libavocadodb_a-voc-shaper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-voc-shaper.o `test -f 'VocBase/voc-shaper.c' || echo '$(srcdir)/'`VocBase/voc-shaper.c - -VocBase/libavocadodb_a-voc-shaper.obj: VocBase/voc-shaper.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-voc-shaper.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-voc-shaper.Tpo -c -o VocBase/libavocadodb_a-voc-shaper.obj `if test -f 'VocBase/voc-shaper.c'; then $(CYGPATH_W) 'VocBase/voc-shaper.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/voc-shaper.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-voc-shaper.Tpo VocBase/$(DEPDIR)/libavocadodb_a-voc-shaper.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/voc-shaper.c' object='VocBase/libavocadodb_a-voc-shaper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-voc-shaper.obj `if test -f 'VocBase/voc-shaper.c'; then $(CYGPATH_W) 'VocBase/voc-shaper.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/voc-shaper.c'; fi` - -VocBase/libavocadodb_a-vocbase.o: VocBase/vocbase.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-vocbase.o -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-vocbase.Tpo -c -o VocBase/libavocadodb_a-vocbase.o `test -f 'VocBase/vocbase.c' || echo '$(srcdir)/'`VocBase/vocbase.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-vocbase.Tpo VocBase/$(DEPDIR)/libavocadodb_a-vocbase.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/vocbase.c' object='VocBase/libavocadodb_a-vocbase.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-vocbase.o `test -f 'VocBase/vocbase.c' || echo '$(srcdir)/'`VocBase/vocbase.c - -VocBase/libavocadodb_a-vocbase.obj: VocBase/vocbase.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VocBase/libavocadodb_a-vocbase.obj -MD -MP -MF VocBase/$(DEPDIR)/libavocadodb_a-vocbase.Tpo -c -o VocBase/libavocadodb_a-vocbase.obj `if test -f 'VocBase/vocbase.c'; then $(CYGPATH_W) 'VocBase/vocbase.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/vocbase.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) VocBase/$(DEPDIR)/libavocadodb_a-vocbase.Tpo VocBase/$(DEPDIR)/libavocadodb_a-vocbase.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='VocBase/vocbase.c' object='VocBase/libavocadodb_a-vocbase.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VocBase/libavocadodb_a-vocbase.obj `if test -f 'VocBase/vocbase.c'; then $(CYGPATH_W) 'VocBase/vocbase.c'; else $(CYGPATH_W) '$(srcdir)/VocBase/vocbase.c'; fi` - -QL/libavocadodb_a-ast-node.o: QL/ast-node.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-ast-node.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-ast-node.Tpo -c -o QL/libavocadodb_a-ast-node.o `test -f 'QL/ast-node.c' || echo '$(srcdir)/'`QL/ast-node.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-ast-node.Tpo QL/$(DEPDIR)/libavocadodb_a-ast-node.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/ast-node.c' object='QL/libavocadodb_a-ast-node.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-ast-node.o `test -f 'QL/ast-node.c' || echo '$(srcdir)/'`QL/ast-node.c - -QL/libavocadodb_a-ast-node.obj: QL/ast-node.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-ast-node.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-ast-node.Tpo -c -o QL/libavocadodb_a-ast-node.obj `if test -f 'QL/ast-node.c'; then $(CYGPATH_W) 'QL/ast-node.c'; else $(CYGPATH_W) '$(srcdir)/QL/ast-node.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-ast-node.Tpo QL/$(DEPDIR)/libavocadodb_a-ast-node.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/ast-node.c' object='QL/libavocadodb_a-ast-node.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-ast-node.obj `if test -f 'QL/ast-node.c'; then $(CYGPATH_W) 'QL/ast-node.c'; else $(CYGPATH_W) '$(srcdir)/QL/ast-node.c'; fi` - -QL/libavocadodb_a-ast-query.o: QL/ast-query.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-ast-query.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-ast-query.Tpo -c -o QL/libavocadodb_a-ast-query.o `test -f 'QL/ast-query.c' || echo '$(srcdir)/'`QL/ast-query.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-ast-query.Tpo QL/$(DEPDIR)/libavocadodb_a-ast-query.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/ast-query.c' object='QL/libavocadodb_a-ast-query.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-ast-query.o `test -f 'QL/ast-query.c' || echo '$(srcdir)/'`QL/ast-query.c - -QL/libavocadodb_a-ast-query.obj: QL/ast-query.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-ast-query.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-ast-query.Tpo -c -o QL/libavocadodb_a-ast-query.obj `if test -f 'QL/ast-query.c'; then $(CYGPATH_W) 'QL/ast-query.c'; else $(CYGPATH_W) '$(srcdir)/QL/ast-query.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-ast-query.Tpo QL/$(DEPDIR)/libavocadodb_a-ast-query.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/ast-query.c' object='QL/libavocadodb_a-ast-query.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-ast-query.obj `if test -f 'QL/ast-query.c'; then $(CYGPATH_W) 'QL/ast-query.c'; else $(CYGPATH_W) '$(srcdir)/QL/ast-query.c'; fi` - -QL/libavocadodb_a-error.o: QL/error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-error.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-error.Tpo -c -o QL/libavocadodb_a-error.o `test -f 'QL/error.c' || echo '$(srcdir)/'`QL/error.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-error.Tpo QL/$(DEPDIR)/libavocadodb_a-error.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/error.c' object='QL/libavocadodb_a-error.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-error.o `test -f 'QL/error.c' || echo '$(srcdir)/'`QL/error.c - -QL/libavocadodb_a-error.obj: QL/error.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-error.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-error.Tpo -c -o QL/libavocadodb_a-error.obj `if test -f 'QL/error.c'; then $(CYGPATH_W) 'QL/error.c'; else $(CYGPATH_W) '$(srcdir)/QL/error.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-error.Tpo QL/$(DEPDIR)/libavocadodb_a-error.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/error.c' object='QL/libavocadodb_a-error.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-error.obj `if test -f 'QL/error.c'; then $(CYGPATH_W) 'QL/error.c'; else $(CYGPATH_W) '$(srcdir)/QL/error.c'; fi` - -QL/libavocadodb_a-formatter.o: QL/formatter.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-formatter.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-formatter.Tpo -c -o QL/libavocadodb_a-formatter.o `test -f 'QL/formatter.c' || echo '$(srcdir)/'`QL/formatter.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-formatter.Tpo QL/$(DEPDIR)/libavocadodb_a-formatter.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/formatter.c' object='QL/libavocadodb_a-formatter.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-formatter.o `test -f 'QL/formatter.c' || echo '$(srcdir)/'`QL/formatter.c - -QL/libavocadodb_a-formatter.obj: QL/formatter.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-formatter.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-formatter.Tpo -c -o QL/libavocadodb_a-formatter.obj `if test -f 'QL/formatter.c'; then $(CYGPATH_W) 'QL/formatter.c'; else $(CYGPATH_W) '$(srcdir)/QL/formatter.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-formatter.Tpo QL/$(DEPDIR)/libavocadodb_a-formatter.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/formatter.c' object='QL/libavocadodb_a-formatter.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-formatter.obj `if test -f 'QL/formatter.c'; then $(CYGPATH_W) 'QL/formatter.c'; else $(CYGPATH_W) '$(srcdir)/QL/formatter.c'; fi` - -QL/libavocadodb_a-javascripter.o: QL/javascripter.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-javascripter.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-javascripter.Tpo -c -o QL/libavocadodb_a-javascripter.o `test -f 'QL/javascripter.c' || echo '$(srcdir)/'`QL/javascripter.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-javascripter.Tpo QL/$(DEPDIR)/libavocadodb_a-javascripter.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/javascripter.c' object='QL/libavocadodb_a-javascripter.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-javascripter.o `test -f 'QL/javascripter.c' || echo '$(srcdir)/'`QL/javascripter.c - -QL/libavocadodb_a-javascripter.obj: QL/javascripter.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-javascripter.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-javascripter.Tpo -c -o QL/libavocadodb_a-javascripter.obj `if test -f 'QL/javascripter.c'; then $(CYGPATH_W) 'QL/javascripter.c'; else $(CYGPATH_W) '$(srcdir)/QL/javascripter.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-javascripter.Tpo QL/$(DEPDIR)/libavocadodb_a-javascripter.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/javascripter.c' object='QL/libavocadodb_a-javascripter.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-javascripter.obj `if test -f 'QL/javascripter.c'; then $(CYGPATH_W) 'QL/javascripter.c'; else $(CYGPATH_W) '$(srcdir)/QL/javascripter.c'; fi` - -QL/libavocadodb_a-optimize.o: QL/optimize.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-optimize.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-optimize.Tpo -c -o QL/libavocadodb_a-optimize.o `test -f 'QL/optimize.c' || echo '$(srcdir)/'`QL/optimize.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-optimize.Tpo QL/$(DEPDIR)/libavocadodb_a-optimize.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/optimize.c' object='QL/libavocadodb_a-optimize.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-optimize.o `test -f 'QL/optimize.c' || echo '$(srcdir)/'`QL/optimize.c - -QL/libavocadodb_a-optimize.obj: QL/optimize.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-optimize.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-optimize.Tpo -c -o QL/libavocadodb_a-optimize.obj `if test -f 'QL/optimize.c'; then $(CYGPATH_W) 'QL/optimize.c'; else $(CYGPATH_W) '$(srcdir)/QL/optimize.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-optimize.Tpo QL/$(DEPDIR)/libavocadodb_a-optimize.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/optimize.c' object='QL/libavocadodb_a-optimize.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-optimize.obj `if test -f 'QL/optimize.c'; then $(CYGPATH_W) 'QL/optimize.c'; else $(CYGPATH_W) '$(srcdir)/QL/optimize.c'; fi` - -QL/libavocadodb_a-parser-context.o: QL/parser-context.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-parser-context.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-parser-context.Tpo -c -o QL/libavocadodb_a-parser-context.o `test -f 'QL/parser-context.c' || echo '$(srcdir)/'`QL/parser-context.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-parser-context.Tpo QL/$(DEPDIR)/libavocadodb_a-parser-context.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/parser-context.c' object='QL/libavocadodb_a-parser-context.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-parser-context.o `test -f 'QL/parser-context.c' || echo '$(srcdir)/'`QL/parser-context.c - -QL/libavocadodb_a-parser-context.obj: QL/parser-context.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-parser-context.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-parser-context.Tpo -c -o QL/libavocadodb_a-parser-context.obj `if test -f 'QL/parser-context.c'; then $(CYGPATH_W) 'QL/parser-context.c'; else $(CYGPATH_W) '$(srcdir)/QL/parser-context.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-parser-context.Tpo QL/$(DEPDIR)/libavocadodb_a-parser-context.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/parser-context.c' object='QL/libavocadodb_a-parser-context.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-parser-context.obj `if test -f 'QL/parser-context.c'; then $(CYGPATH_W) 'QL/parser-context.c'; else $(CYGPATH_W) '$(srcdir)/QL/parser-context.c'; fi` - -QL/libavocadodb_a-parser.o: QL/parser.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-parser.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-parser.Tpo -c -o QL/libavocadodb_a-parser.o `test -f 'QL/parser.c' || echo '$(srcdir)/'`QL/parser.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-parser.Tpo QL/$(DEPDIR)/libavocadodb_a-parser.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/parser.c' object='QL/libavocadodb_a-parser.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-parser.o `test -f 'QL/parser.c' || echo '$(srcdir)/'`QL/parser.c - -QL/libavocadodb_a-parser.obj: QL/parser.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-parser.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-parser.Tpo -c -o QL/libavocadodb_a-parser.obj `if test -f 'QL/parser.c'; then $(CYGPATH_W) 'QL/parser.c'; else $(CYGPATH_W) '$(srcdir)/QL/parser.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-parser.Tpo QL/$(DEPDIR)/libavocadodb_a-parser.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/parser.c' object='QL/libavocadodb_a-parser.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-parser.obj `if test -f 'QL/parser.c'; then $(CYGPATH_W) 'QL/parser.c'; else $(CYGPATH_W) '$(srcdir)/QL/parser.c'; fi` - -QL/libavocadodb_a-tokens.o: QL/tokens.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-tokens.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-tokens.Tpo -c -o QL/libavocadodb_a-tokens.o `test -f 'QL/tokens.c' || echo '$(srcdir)/'`QL/tokens.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-tokens.Tpo QL/$(DEPDIR)/libavocadodb_a-tokens.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/tokens.c' object='QL/libavocadodb_a-tokens.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-tokens.o `test -f 'QL/tokens.c' || echo '$(srcdir)/'`QL/tokens.c - -QL/libavocadodb_a-tokens.obj: QL/tokens.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT QL/libavocadodb_a-tokens.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-tokens.Tpo -c -o QL/libavocadodb_a-tokens.obj `if test -f 'QL/tokens.c'; then $(CYGPATH_W) 'QL/tokens.c'; else $(CYGPATH_W) '$(srcdir)/QL/tokens.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-tokens.Tpo QL/$(DEPDIR)/libavocadodb_a-tokens.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='QL/tokens.c' object='QL/libavocadodb_a-tokens.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o QL/libavocadodb_a-tokens.obj `if test -f 'QL/tokens.c'; then $(CYGPATH_W) 'QL/tokens.c'; else $(CYGPATH_W) '$(srcdir)/QL/tokens.c'; fi` - .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @@ -2848,1926 +1831,6 @@ QL/libavocadodb_a-tokens.obj: QL/tokens.c @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -Admin/libavocadodb_a-ApplicationAdminServer.o: Admin/ApplicationAdminServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-ApplicationAdminServer.o -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-ApplicationAdminServer.Tpo -c -o Admin/libavocadodb_a-ApplicationAdminServer.o `test -f 'Admin/ApplicationAdminServer.cpp' || echo '$(srcdir)/'`Admin/ApplicationAdminServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-ApplicationAdminServer.Tpo Admin/$(DEPDIR)/libavocadodb_a-ApplicationAdminServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/ApplicationAdminServer.cpp' object='Admin/libavocadodb_a-ApplicationAdminServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-ApplicationAdminServer.o `test -f 'Admin/ApplicationAdminServer.cpp' || echo '$(srcdir)/'`Admin/ApplicationAdminServer.cpp - -Admin/libavocadodb_a-ApplicationAdminServer.obj: Admin/ApplicationAdminServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-ApplicationAdminServer.obj -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-ApplicationAdminServer.Tpo -c -o Admin/libavocadodb_a-ApplicationAdminServer.obj `if test -f 'Admin/ApplicationAdminServer.cpp'; then $(CYGPATH_W) 'Admin/ApplicationAdminServer.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/ApplicationAdminServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-ApplicationAdminServer.Tpo Admin/$(DEPDIR)/libavocadodb_a-ApplicationAdminServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/ApplicationAdminServer.cpp' object='Admin/libavocadodb_a-ApplicationAdminServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-ApplicationAdminServer.obj `if test -f 'Admin/ApplicationAdminServer.cpp'; then $(CYGPATH_W) 'Admin/ApplicationAdminServer.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/ApplicationAdminServer.cpp'; fi` - -Admin/libavocadodb_a-RestAdminBaseHandler.o: Admin/RestAdminBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestAdminBaseHandler.o -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestAdminBaseHandler.Tpo -c -o Admin/libavocadodb_a-RestAdminBaseHandler.o `test -f 'Admin/RestAdminBaseHandler.cpp' || echo '$(srcdir)/'`Admin/RestAdminBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestAdminBaseHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestAdminBaseHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestAdminBaseHandler.cpp' object='Admin/libavocadodb_a-RestAdminBaseHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestAdminBaseHandler.o `test -f 'Admin/RestAdminBaseHandler.cpp' || echo '$(srcdir)/'`Admin/RestAdminBaseHandler.cpp - -Admin/libavocadodb_a-RestAdminBaseHandler.obj: Admin/RestAdminBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestAdminBaseHandler.obj -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestAdminBaseHandler.Tpo -c -o Admin/libavocadodb_a-RestAdminBaseHandler.obj `if test -f 'Admin/RestAdminBaseHandler.cpp'; then $(CYGPATH_W) 'Admin/RestAdminBaseHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestAdminBaseHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestAdminBaseHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestAdminBaseHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestAdminBaseHandler.cpp' object='Admin/libavocadodb_a-RestAdminBaseHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestAdminBaseHandler.obj `if test -f 'Admin/RestAdminBaseHandler.cpp'; then $(CYGPATH_W) 'Admin/RestAdminBaseHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestAdminBaseHandler.cpp'; fi` - -Admin/libavocadodb_a-RestAdminFeConfigurationHandler.o: Admin/RestAdminFeConfigurationHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestAdminFeConfigurationHandler.o -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestAdminFeConfigurationHandler.Tpo -c -o Admin/libavocadodb_a-RestAdminFeConfigurationHandler.o `test -f 'Admin/RestAdminFeConfigurationHandler.cpp' || echo '$(srcdir)/'`Admin/RestAdminFeConfigurationHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestAdminFeConfigurationHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestAdminFeConfigurationHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestAdminFeConfigurationHandler.cpp' object='Admin/libavocadodb_a-RestAdminFeConfigurationHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestAdminFeConfigurationHandler.o `test -f 'Admin/RestAdminFeConfigurationHandler.cpp' || echo '$(srcdir)/'`Admin/RestAdminFeConfigurationHandler.cpp - -Admin/libavocadodb_a-RestAdminFeConfigurationHandler.obj: Admin/RestAdminFeConfigurationHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestAdminFeConfigurationHandler.obj -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestAdminFeConfigurationHandler.Tpo -c -o Admin/libavocadodb_a-RestAdminFeConfigurationHandler.obj `if test -f 'Admin/RestAdminFeConfigurationHandler.cpp'; then $(CYGPATH_W) 'Admin/RestAdminFeConfigurationHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestAdminFeConfigurationHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestAdminFeConfigurationHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestAdminFeConfigurationHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestAdminFeConfigurationHandler.cpp' object='Admin/libavocadodb_a-RestAdminFeConfigurationHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestAdminFeConfigurationHandler.obj `if test -f 'Admin/RestAdminFeConfigurationHandler.cpp'; then $(CYGPATH_W) 'Admin/RestAdminFeConfigurationHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestAdminFeConfigurationHandler.cpp'; fi` - -Admin/libavocadodb_a-RestAdminLogHandler.o: Admin/RestAdminLogHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestAdminLogHandler.o -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestAdminLogHandler.Tpo -c -o Admin/libavocadodb_a-RestAdminLogHandler.o `test -f 'Admin/RestAdminLogHandler.cpp' || echo '$(srcdir)/'`Admin/RestAdminLogHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestAdminLogHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestAdminLogHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestAdminLogHandler.cpp' object='Admin/libavocadodb_a-RestAdminLogHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestAdminLogHandler.o `test -f 'Admin/RestAdminLogHandler.cpp' || echo '$(srcdir)/'`Admin/RestAdminLogHandler.cpp - -Admin/libavocadodb_a-RestAdminLogHandler.obj: Admin/RestAdminLogHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestAdminLogHandler.obj -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestAdminLogHandler.Tpo -c -o Admin/libavocadodb_a-RestAdminLogHandler.obj `if test -f 'Admin/RestAdminLogHandler.cpp'; then $(CYGPATH_W) 'Admin/RestAdminLogHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestAdminLogHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestAdminLogHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestAdminLogHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestAdminLogHandler.cpp' object='Admin/libavocadodb_a-RestAdminLogHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestAdminLogHandler.obj `if test -f 'Admin/RestAdminLogHandler.cpp'; then $(CYGPATH_W) 'Admin/RestAdminLogHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestAdminLogHandler.cpp'; fi` - -Admin/libavocadodb_a-RestBaseHandler.o: Admin/RestBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestBaseHandler.o -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestBaseHandler.Tpo -c -o Admin/libavocadodb_a-RestBaseHandler.o `test -f 'Admin/RestBaseHandler.cpp' || echo '$(srcdir)/'`Admin/RestBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestBaseHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestBaseHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestBaseHandler.cpp' object='Admin/libavocadodb_a-RestBaseHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestBaseHandler.o `test -f 'Admin/RestBaseHandler.cpp' || echo '$(srcdir)/'`Admin/RestBaseHandler.cpp - -Admin/libavocadodb_a-RestBaseHandler.obj: Admin/RestBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestBaseHandler.obj -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestBaseHandler.Tpo -c -o Admin/libavocadodb_a-RestBaseHandler.obj `if test -f 'Admin/RestBaseHandler.cpp'; then $(CYGPATH_W) 'Admin/RestBaseHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestBaseHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestBaseHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestBaseHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestBaseHandler.cpp' object='Admin/libavocadodb_a-RestBaseHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestBaseHandler.obj `if test -f 'Admin/RestBaseHandler.cpp'; then $(CYGPATH_W) 'Admin/RestBaseHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestBaseHandler.cpp'; fi` - -Admin/libavocadodb_a-RestVersionHandler.o: Admin/RestVersionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestVersionHandler.o -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestVersionHandler.Tpo -c -o Admin/libavocadodb_a-RestVersionHandler.o `test -f 'Admin/RestVersionHandler.cpp' || echo '$(srcdir)/'`Admin/RestVersionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestVersionHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestVersionHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestVersionHandler.cpp' object='Admin/libavocadodb_a-RestVersionHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestVersionHandler.o `test -f 'Admin/RestVersionHandler.cpp' || echo '$(srcdir)/'`Admin/RestVersionHandler.cpp - -Admin/libavocadodb_a-RestVersionHandler.obj: Admin/RestVersionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Admin/libavocadodb_a-RestVersionHandler.obj -MD -MP -MF Admin/$(DEPDIR)/libavocadodb_a-RestVersionHandler.Tpo -c -o Admin/libavocadodb_a-RestVersionHandler.obj `if test -f 'Admin/RestVersionHandler.cpp'; then $(CYGPATH_W) 'Admin/RestVersionHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestVersionHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Admin/$(DEPDIR)/libavocadodb_a-RestVersionHandler.Tpo Admin/$(DEPDIR)/libavocadodb_a-RestVersionHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Admin/RestVersionHandler.cpp' object='Admin/libavocadodb_a-RestVersionHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Admin/libavocadodb_a-RestVersionHandler.obj `if test -f 'Admin/RestVersionHandler.cpp'; then $(CYGPATH_W) 'Admin/RestVersionHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/Admin/RestVersionHandler.cpp'; fi` - -ApplicationServer/libavocadodb_a-ApplicationServer.o: ApplicationServer/ApplicationServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ApplicationServer/libavocadodb_a-ApplicationServer.o -MD -MP -MF ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServer.Tpo -c -o ApplicationServer/libavocadodb_a-ApplicationServer.o `test -f 'ApplicationServer/ApplicationServer.cpp' || echo '$(srcdir)/'`ApplicationServer/ApplicationServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServer.Tpo ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ApplicationServer/ApplicationServer.cpp' object='ApplicationServer/libavocadodb_a-ApplicationServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ApplicationServer/libavocadodb_a-ApplicationServer.o `test -f 'ApplicationServer/ApplicationServer.cpp' || echo '$(srcdir)/'`ApplicationServer/ApplicationServer.cpp - -ApplicationServer/libavocadodb_a-ApplicationServer.obj: ApplicationServer/ApplicationServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ApplicationServer/libavocadodb_a-ApplicationServer.obj -MD -MP -MF ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServer.Tpo -c -o ApplicationServer/libavocadodb_a-ApplicationServer.obj `if test -f 'ApplicationServer/ApplicationServer.cpp'; then $(CYGPATH_W) 'ApplicationServer/ApplicationServer.cpp'; else $(CYGPATH_W) '$(srcdir)/ApplicationServer/ApplicationServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServer.Tpo ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ApplicationServer/ApplicationServer.cpp' object='ApplicationServer/libavocadodb_a-ApplicationServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ApplicationServer/libavocadodb_a-ApplicationServer.obj `if test -f 'ApplicationServer/ApplicationServer.cpp'; then $(CYGPATH_W) 'ApplicationServer/ApplicationServer.cpp'; else $(CYGPATH_W) '$(srcdir)/ApplicationServer/ApplicationServer.cpp'; fi` - -ApplicationServer/libavocadodb_a-ApplicationServerImpl.o: ApplicationServer/ApplicationServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ApplicationServer/libavocadodb_a-ApplicationServerImpl.o -MD -MP -MF ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerImpl.Tpo -c -o ApplicationServer/libavocadodb_a-ApplicationServerImpl.o `test -f 'ApplicationServer/ApplicationServerImpl.cpp' || echo '$(srcdir)/'`ApplicationServer/ApplicationServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerImpl.Tpo ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ApplicationServer/ApplicationServerImpl.cpp' object='ApplicationServer/libavocadodb_a-ApplicationServerImpl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ApplicationServer/libavocadodb_a-ApplicationServerImpl.o `test -f 'ApplicationServer/ApplicationServerImpl.cpp' || echo '$(srcdir)/'`ApplicationServer/ApplicationServerImpl.cpp - -ApplicationServer/libavocadodb_a-ApplicationServerImpl.obj: ApplicationServer/ApplicationServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ApplicationServer/libavocadodb_a-ApplicationServerImpl.obj -MD -MP -MF ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerImpl.Tpo -c -o ApplicationServer/libavocadodb_a-ApplicationServerImpl.obj `if test -f 'ApplicationServer/ApplicationServerImpl.cpp'; then $(CYGPATH_W) 'ApplicationServer/ApplicationServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/ApplicationServer/ApplicationServerImpl.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerImpl.Tpo ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ApplicationServer/ApplicationServerImpl.cpp' object='ApplicationServer/libavocadodb_a-ApplicationServerImpl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ApplicationServer/libavocadodb_a-ApplicationServerImpl.obj `if test -f 'ApplicationServer/ApplicationServerImpl.cpp'; then $(CYGPATH_W) 'ApplicationServer/ApplicationServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/ApplicationServer/ApplicationServerImpl.cpp'; fi` - -ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.o: ApplicationServer/ApplicationServerSchedulerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.o -MD -MP -MF ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerSchedulerImpl.Tpo -c -o ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.o `test -f 'ApplicationServer/ApplicationServerSchedulerImpl.cpp' || echo '$(srcdir)/'`ApplicationServer/ApplicationServerSchedulerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerSchedulerImpl.Tpo ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerSchedulerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ApplicationServer/ApplicationServerSchedulerImpl.cpp' object='ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.o `test -f 'ApplicationServer/ApplicationServerSchedulerImpl.cpp' || echo '$(srcdir)/'`ApplicationServer/ApplicationServerSchedulerImpl.cpp - -ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.obj: ApplicationServer/ApplicationServerSchedulerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.obj -MD -MP -MF ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerSchedulerImpl.Tpo -c -o ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.obj `if test -f 'ApplicationServer/ApplicationServerSchedulerImpl.cpp'; then $(CYGPATH_W) 'ApplicationServer/ApplicationServerSchedulerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/ApplicationServer/ApplicationServerSchedulerImpl.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerSchedulerImpl.Tpo ApplicationServer/$(DEPDIR)/libavocadodb_a-ApplicationServerSchedulerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ApplicationServer/ApplicationServerSchedulerImpl.cpp' object='ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ApplicationServer/libavocadodb_a-ApplicationServerSchedulerImpl.obj `if test -f 'ApplicationServer/ApplicationServerSchedulerImpl.cpp'; then $(CYGPATH_W) 'ApplicationServer/ApplicationServerSchedulerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/ApplicationServer/ApplicationServerSchedulerImpl.cpp'; fi` - -Basics/libavocadodb_a-ConditionLocker.o: Basics/ConditionLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ConditionLocker.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ConditionLocker.Tpo -c -o Basics/libavocadodb_a-ConditionLocker.o `test -f 'Basics/ConditionLocker.cpp' || echo '$(srcdir)/'`Basics/ConditionLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ConditionLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-ConditionLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ConditionLocker.cpp' object='Basics/libavocadodb_a-ConditionLocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ConditionLocker.o `test -f 'Basics/ConditionLocker.cpp' || echo '$(srcdir)/'`Basics/ConditionLocker.cpp - -Basics/libavocadodb_a-ConditionLocker.obj: Basics/ConditionLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ConditionLocker.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ConditionLocker.Tpo -c -o Basics/libavocadodb_a-ConditionLocker.obj `if test -f 'Basics/ConditionLocker.cpp'; then $(CYGPATH_W) 'Basics/ConditionLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ConditionLocker.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ConditionLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-ConditionLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ConditionLocker.cpp' object='Basics/libavocadodb_a-ConditionLocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ConditionLocker.obj `if test -f 'Basics/ConditionLocker.cpp'; then $(CYGPATH_W) 'Basics/ConditionLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ConditionLocker.cpp'; fi` - -Basics/libavocadodb_a-ConditionVariable.o: Basics/ConditionVariable.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ConditionVariable.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ConditionVariable.Tpo -c -o Basics/libavocadodb_a-ConditionVariable.o `test -f 'Basics/ConditionVariable.cpp' || echo '$(srcdir)/'`Basics/ConditionVariable.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ConditionVariable.Tpo Basics/$(DEPDIR)/libavocadodb_a-ConditionVariable.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ConditionVariable.cpp' object='Basics/libavocadodb_a-ConditionVariable.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ConditionVariable.o `test -f 'Basics/ConditionVariable.cpp' || echo '$(srcdir)/'`Basics/ConditionVariable.cpp - -Basics/libavocadodb_a-ConditionVariable.obj: Basics/ConditionVariable.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ConditionVariable.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ConditionVariable.Tpo -c -o Basics/libavocadodb_a-ConditionVariable.obj `if test -f 'Basics/ConditionVariable.cpp'; then $(CYGPATH_W) 'Basics/ConditionVariable.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ConditionVariable.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ConditionVariable.Tpo Basics/$(DEPDIR)/libavocadodb_a-ConditionVariable.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ConditionVariable.cpp' object='Basics/libavocadodb_a-ConditionVariable.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ConditionVariable.obj `if test -f 'Basics/ConditionVariable.cpp'; then $(CYGPATH_W) 'Basics/ConditionVariable.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ConditionVariable.cpp'; fi` - -Basics/libavocadodb_a-FileUtils.o: Basics/FileUtils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-FileUtils.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-FileUtils.Tpo -c -o Basics/libavocadodb_a-FileUtils.o `test -f 'Basics/FileUtils.cpp' || echo '$(srcdir)/'`Basics/FileUtils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-FileUtils.Tpo Basics/$(DEPDIR)/libavocadodb_a-FileUtils.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/FileUtils.cpp' object='Basics/libavocadodb_a-FileUtils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-FileUtils.o `test -f 'Basics/FileUtils.cpp' || echo '$(srcdir)/'`Basics/FileUtils.cpp - -Basics/libavocadodb_a-FileUtils.obj: Basics/FileUtils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-FileUtils.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-FileUtils.Tpo -c -o Basics/libavocadodb_a-FileUtils.obj `if test -f 'Basics/FileUtils.cpp'; then $(CYGPATH_W) 'Basics/FileUtils.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/FileUtils.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-FileUtils.Tpo Basics/$(DEPDIR)/libavocadodb_a-FileUtils.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/FileUtils.cpp' object='Basics/libavocadodb_a-FileUtils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-FileUtils.obj `if test -f 'Basics/FileUtils.cpp'; then $(CYGPATH_W) 'Basics/FileUtils.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/FileUtils.cpp'; fi` - -Basics/libavocadodb_a-Initialise.o: Basics/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Initialise.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Initialise.Tpo -c -o Basics/libavocadodb_a-Initialise.o `test -f 'Basics/Initialise.cpp' || echo '$(srcdir)/'`Basics/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Initialise.Tpo Basics/$(DEPDIR)/libavocadodb_a-Initialise.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Initialise.cpp' object='Basics/libavocadodb_a-Initialise.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Initialise.o `test -f 'Basics/Initialise.cpp' || echo '$(srcdir)/'`Basics/Initialise.cpp - -Basics/libavocadodb_a-Initialise.obj: Basics/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Initialise.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Initialise.Tpo -c -o Basics/libavocadodb_a-Initialise.obj `if test -f 'Basics/Initialise.cpp'; then $(CYGPATH_W) 'Basics/Initialise.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Initialise.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Initialise.Tpo Basics/$(DEPDIR)/libavocadodb_a-Initialise.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Initialise.cpp' object='Basics/libavocadodb_a-Initialise.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Initialise.obj `if test -f 'Basics/Initialise.cpp'; then $(CYGPATH_W) 'Basics/Initialise.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Initialise.cpp'; fi` - -Basics/libavocadodb_a-LibraryLoader.o: Basics/LibraryLoader.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-LibraryLoader.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-LibraryLoader.Tpo -c -o Basics/libavocadodb_a-LibraryLoader.o `test -f 'Basics/LibraryLoader.cpp' || echo '$(srcdir)/'`Basics/LibraryLoader.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-LibraryLoader.Tpo Basics/$(DEPDIR)/libavocadodb_a-LibraryLoader.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/LibraryLoader.cpp' object='Basics/libavocadodb_a-LibraryLoader.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-LibraryLoader.o `test -f 'Basics/LibraryLoader.cpp' || echo '$(srcdir)/'`Basics/LibraryLoader.cpp - -Basics/libavocadodb_a-LibraryLoader.obj: Basics/LibraryLoader.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-LibraryLoader.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-LibraryLoader.Tpo -c -o Basics/libavocadodb_a-LibraryLoader.obj `if test -f 'Basics/LibraryLoader.cpp'; then $(CYGPATH_W) 'Basics/LibraryLoader.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/LibraryLoader.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-LibraryLoader.Tpo Basics/$(DEPDIR)/libavocadodb_a-LibraryLoader.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/LibraryLoader.cpp' object='Basics/libavocadodb_a-LibraryLoader.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-LibraryLoader.obj `if test -f 'Basics/LibraryLoader.cpp'; then $(CYGPATH_W) 'Basics/LibraryLoader.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/LibraryLoader.cpp'; fi` - -Basics/libavocadodb_a-Mutex.o: Basics/Mutex.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Mutex.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Mutex.Tpo -c -o Basics/libavocadodb_a-Mutex.o `test -f 'Basics/Mutex.cpp' || echo '$(srcdir)/'`Basics/Mutex.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Mutex.Tpo Basics/$(DEPDIR)/libavocadodb_a-Mutex.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Mutex.cpp' object='Basics/libavocadodb_a-Mutex.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Mutex.o `test -f 'Basics/Mutex.cpp' || echo '$(srcdir)/'`Basics/Mutex.cpp - -Basics/libavocadodb_a-Mutex.obj: Basics/Mutex.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Mutex.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Mutex.Tpo -c -o Basics/libavocadodb_a-Mutex.obj `if test -f 'Basics/Mutex.cpp'; then $(CYGPATH_W) 'Basics/Mutex.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Mutex.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Mutex.Tpo Basics/$(DEPDIR)/libavocadodb_a-Mutex.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Mutex.cpp' object='Basics/libavocadodb_a-Mutex.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Mutex.obj `if test -f 'Basics/Mutex.cpp'; then $(CYGPATH_W) 'Basics/Mutex.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Mutex.cpp'; fi` - -Basics/libavocadodb_a-MutexLocker.o: Basics/MutexLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-MutexLocker.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-MutexLocker.Tpo -c -o Basics/libavocadodb_a-MutexLocker.o `test -f 'Basics/MutexLocker.cpp' || echo '$(srcdir)/'`Basics/MutexLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-MutexLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-MutexLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/MutexLocker.cpp' object='Basics/libavocadodb_a-MutexLocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-MutexLocker.o `test -f 'Basics/MutexLocker.cpp' || echo '$(srcdir)/'`Basics/MutexLocker.cpp - -Basics/libavocadodb_a-MutexLocker.obj: Basics/MutexLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-MutexLocker.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-MutexLocker.Tpo -c -o Basics/libavocadodb_a-MutexLocker.obj `if test -f 'Basics/MutexLocker.cpp'; then $(CYGPATH_W) 'Basics/MutexLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/MutexLocker.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-MutexLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-MutexLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/MutexLocker.cpp' object='Basics/libavocadodb_a-MutexLocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-MutexLocker.obj `if test -f 'Basics/MutexLocker.cpp'; then $(CYGPATH_W) 'Basics/MutexLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/MutexLocker.cpp'; fi` - -Basics/libavocadodb_a-ProgramOptions.o: Basics/ProgramOptions.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ProgramOptions.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ProgramOptions.Tpo -c -o Basics/libavocadodb_a-ProgramOptions.o `test -f 'Basics/ProgramOptions.cpp' || echo '$(srcdir)/'`Basics/ProgramOptions.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ProgramOptions.Tpo Basics/$(DEPDIR)/libavocadodb_a-ProgramOptions.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ProgramOptions.cpp' object='Basics/libavocadodb_a-ProgramOptions.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ProgramOptions.o `test -f 'Basics/ProgramOptions.cpp' || echo '$(srcdir)/'`Basics/ProgramOptions.cpp - -Basics/libavocadodb_a-ProgramOptions.obj: Basics/ProgramOptions.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ProgramOptions.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ProgramOptions.Tpo -c -o Basics/libavocadodb_a-ProgramOptions.obj `if test -f 'Basics/ProgramOptions.cpp'; then $(CYGPATH_W) 'Basics/ProgramOptions.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ProgramOptions.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ProgramOptions.Tpo Basics/$(DEPDIR)/libavocadodb_a-ProgramOptions.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ProgramOptions.cpp' object='Basics/libavocadodb_a-ProgramOptions.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ProgramOptions.obj `if test -f 'Basics/ProgramOptions.cpp'; then $(CYGPATH_W) 'Basics/ProgramOptions.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ProgramOptions.cpp'; fi` - -Basics/libavocadodb_a-ProgramOptionsDescription.o: Basics/ProgramOptionsDescription.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ProgramOptionsDescription.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ProgramOptionsDescription.Tpo -c -o Basics/libavocadodb_a-ProgramOptionsDescription.o `test -f 'Basics/ProgramOptionsDescription.cpp' || echo '$(srcdir)/'`Basics/ProgramOptionsDescription.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ProgramOptionsDescription.Tpo Basics/$(DEPDIR)/libavocadodb_a-ProgramOptionsDescription.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ProgramOptionsDescription.cpp' object='Basics/libavocadodb_a-ProgramOptionsDescription.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ProgramOptionsDescription.o `test -f 'Basics/ProgramOptionsDescription.cpp' || echo '$(srcdir)/'`Basics/ProgramOptionsDescription.cpp - -Basics/libavocadodb_a-ProgramOptionsDescription.obj: Basics/ProgramOptionsDescription.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ProgramOptionsDescription.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ProgramOptionsDescription.Tpo -c -o Basics/libavocadodb_a-ProgramOptionsDescription.obj `if test -f 'Basics/ProgramOptionsDescription.cpp'; then $(CYGPATH_W) 'Basics/ProgramOptionsDescription.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ProgramOptionsDescription.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ProgramOptionsDescription.Tpo Basics/$(DEPDIR)/libavocadodb_a-ProgramOptionsDescription.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ProgramOptionsDescription.cpp' object='Basics/libavocadodb_a-ProgramOptionsDescription.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ProgramOptionsDescription.obj `if test -f 'Basics/ProgramOptionsDescription.cpp'; then $(CYGPATH_W) 'Basics/ProgramOptionsDescription.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ProgramOptionsDescription.cpp'; fi` - -Basics/libavocadodb_a-Random.o: Basics/Random.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Random.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Random.Tpo -c -o Basics/libavocadodb_a-Random.o `test -f 'Basics/Random.cpp' || echo '$(srcdir)/'`Basics/Random.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Random.Tpo Basics/$(DEPDIR)/libavocadodb_a-Random.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Random.cpp' object='Basics/libavocadodb_a-Random.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Random.o `test -f 'Basics/Random.cpp' || echo '$(srcdir)/'`Basics/Random.cpp - -Basics/libavocadodb_a-Random.obj: Basics/Random.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Random.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Random.Tpo -c -o Basics/libavocadodb_a-Random.obj `if test -f 'Basics/Random.cpp'; then $(CYGPATH_W) 'Basics/Random.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Random.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Random.Tpo Basics/$(DEPDIR)/libavocadodb_a-Random.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Random.cpp' object='Basics/libavocadodb_a-Random.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Random.obj `if test -f 'Basics/Random.cpp'; then $(CYGPATH_W) 'Basics/Random.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Random.cpp'; fi` - -Basics/libavocadodb_a-ReadLocker.o: Basics/ReadLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ReadLocker.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ReadLocker.Tpo -c -o Basics/libavocadodb_a-ReadLocker.o `test -f 'Basics/ReadLocker.cpp' || echo '$(srcdir)/'`Basics/ReadLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ReadLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-ReadLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ReadLocker.cpp' object='Basics/libavocadodb_a-ReadLocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ReadLocker.o `test -f 'Basics/ReadLocker.cpp' || echo '$(srcdir)/'`Basics/ReadLocker.cpp - -Basics/libavocadodb_a-ReadLocker.obj: Basics/ReadLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ReadLocker.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ReadLocker.Tpo -c -o Basics/libavocadodb_a-ReadLocker.obj `if test -f 'Basics/ReadLocker.cpp'; then $(CYGPATH_W) 'Basics/ReadLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ReadLocker.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ReadLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-ReadLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ReadLocker.cpp' object='Basics/libavocadodb_a-ReadLocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ReadLocker.obj `if test -f 'Basics/ReadLocker.cpp'; then $(CYGPATH_W) 'Basics/ReadLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ReadLocker.cpp'; fi` - -Basics/libavocadodb_a-ReadUnlocker.o: Basics/ReadUnlocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ReadUnlocker.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ReadUnlocker.Tpo -c -o Basics/libavocadodb_a-ReadUnlocker.o `test -f 'Basics/ReadUnlocker.cpp' || echo '$(srcdir)/'`Basics/ReadUnlocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ReadUnlocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-ReadUnlocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ReadUnlocker.cpp' object='Basics/libavocadodb_a-ReadUnlocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ReadUnlocker.o `test -f 'Basics/ReadUnlocker.cpp' || echo '$(srcdir)/'`Basics/ReadUnlocker.cpp - -Basics/libavocadodb_a-ReadUnlocker.obj: Basics/ReadUnlocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ReadUnlocker.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ReadUnlocker.Tpo -c -o Basics/libavocadodb_a-ReadUnlocker.obj `if test -f 'Basics/ReadUnlocker.cpp'; then $(CYGPATH_W) 'Basics/ReadUnlocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ReadUnlocker.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ReadUnlocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-ReadUnlocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ReadUnlocker.cpp' object='Basics/libavocadodb_a-ReadUnlocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ReadUnlocker.obj `if test -f 'Basics/ReadUnlocker.cpp'; then $(CYGPATH_W) 'Basics/ReadUnlocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ReadUnlocker.cpp'; fi` - -Basics/libavocadodb_a-ReadWriteLock.o: Basics/ReadWriteLock.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ReadWriteLock.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ReadWriteLock.Tpo -c -o Basics/libavocadodb_a-ReadWriteLock.o `test -f 'Basics/ReadWriteLock.cpp' || echo '$(srcdir)/'`Basics/ReadWriteLock.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ReadWriteLock.Tpo Basics/$(DEPDIR)/libavocadodb_a-ReadWriteLock.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ReadWriteLock.cpp' object='Basics/libavocadodb_a-ReadWriteLock.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ReadWriteLock.o `test -f 'Basics/ReadWriteLock.cpp' || echo '$(srcdir)/'`Basics/ReadWriteLock.cpp - -Basics/libavocadodb_a-ReadWriteLock.obj: Basics/ReadWriteLock.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-ReadWriteLock.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-ReadWriteLock.Tpo -c -o Basics/libavocadodb_a-ReadWriteLock.obj `if test -f 'Basics/ReadWriteLock.cpp'; then $(CYGPATH_W) 'Basics/ReadWriteLock.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ReadWriteLock.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-ReadWriteLock.Tpo Basics/$(DEPDIR)/libavocadodb_a-ReadWriteLock.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/ReadWriteLock.cpp' object='Basics/libavocadodb_a-ReadWriteLock.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-ReadWriteLock.obj `if test -f 'Basics/ReadWriteLock.cpp'; then $(CYGPATH_W) 'Basics/ReadWriteLock.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/ReadWriteLock.cpp'; fi` - -Basics/libavocadodb_a-StringUtils.o: Basics/StringUtils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-StringUtils.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-StringUtils.Tpo -c -o Basics/libavocadodb_a-StringUtils.o `test -f 'Basics/StringUtils.cpp' || echo '$(srcdir)/'`Basics/StringUtils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-StringUtils.Tpo Basics/$(DEPDIR)/libavocadodb_a-StringUtils.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/StringUtils.cpp' object='Basics/libavocadodb_a-StringUtils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-StringUtils.o `test -f 'Basics/StringUtils.cpp' || echo '$(srcdir)/'`Basics/StringUtils.cpp - -Basics/libavocadodb_a-StringUtils.obj: Basics/StringUtils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-StringUtils.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-StringUtils.Tpo -c -o Basics/libavocadodb_a-StringUtils.obj `if test -f 'Basics/StringUtils.cpp'; then $(CYGPATH_W) 'Basics/StringUtils.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/StringUtils.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-StringUtils.Tpo Basics/$(DEPDIR)/libavocadodb_a-StringUtils.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/StringUtils.cpp' object='Basics/libavocadodb_a-StringUtils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-StringUtils.obj `if test -f 'Basics/StringUtils.cpp'; then $(CYGPATH_W) 'Basics/StringUtils.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/StringUtils.cpp'; fi` - -Basics/libavocadodb_a-Thread.o: Basics/Thread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Thread.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Thread.Tpo -c -o Basics/libavocadodb_a-Thread.o `test -f 'Basics/Thread.cpp' || echo '$(srcdir)/'`Basics/Thread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Thread.Tpo Basics/$(DEPDIR)/libavocadodb_a-Thread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Thread.cpp' object='Basics/libavocadodb_a-Thread.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Thread.o `test -f 'Basics/Thread.cpp' || echo '$(srcdir)/'`Basics/Thread.cpp - -Basics/libavocadodb_a-Thread.obj: Basics/Thread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Thread.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Thread.Tpo -c -o Basics/libavocadodb_a-Thread.obj `if test -f 'Basics/Thread.cpp'; then $(CYGPATH_W) 'Basics/Thread.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Thread.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Thread.Tpo Basics/$(DEPDIR)/libavocadodb_a-Thread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Thread.cpp' object='Basics/libavocadodb_a-Thread.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Thread.obj `if test -f 'Basics/Thread.cpp'; then $(CYGPATH_W) 'Basics/Thread.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Thread.cpp'; fi` - -Basics/libavocadodb_a-Timing.o: Basics/Timing.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Timing.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Timing.Tpo -c -o Basics/libavocadodb_a-Timing.o `test -f 'Basics/Timing.cpp' || echo '$(srcdir)/'`Basics/Timing.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Timing.Tpo Basics/$(DEPDIR)/libavocadodb_a-Timing.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Timing.cpp' object='Basics/libavocadodb_a-Timing.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Timing.o `test -f 'Basics/Timing.cpp' || echo '$(srcdir)/'`Basics/Timing.cpp - -Basics/libavocadodb_a-Timing.obj: Basics/Timing.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-Timing.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-Timing.Tpo -c -o Basics/libavocadodb_a-Timing.obj `if test -f 'Basics/Timing.cpp'; then $(CYGPATH_W) 'Basics/Timing.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Timing.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-Timing.Tpo Basics/$(DEPDIR)/libavocadodb_a-Timing.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/Timing.cpp' object='Basics/libavocadodb_a-Timing.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-Timing.obj `if test -f 'Basics/Timing.cpp'; then $(CYGPATH_W) 'Basics/Timing.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/Timing.cpp'; fi` - -Basics/libavocadodb_a-WriteLocker.o: Basics/WriteLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-WriteLocker.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-WriteLocker.Tpo -c -o Basics/libavocadodb_a-WriteLocker.o `test -f 'Basics/WriteLocker.cpp' || echo '$(srcdir)/'`Basics/WriteLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-WriteLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-WriteLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/WriteLocker.cpp' object='Basics/libavocadodb_a-WriteLocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-WriteLocker.o `test -f 'Basics/WriteLocker.cpp' || echo '$(srcdir)/'`Basics/WriteLocker.cpp - -Basics/libavocadodb_a-WriteLocker.obj: Basics/WriteLocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-WriteLocker.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-WriteLocker.Tpo -c -o Basics/libavocadodb_a-WriteLocker.obj `if test -f 'Basics/WriteLocker.cpp'; then $(CYGPATH_W) 'Basics/WriteLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/WriteLocker.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-WriteLocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-WriteLocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/WriteLocker.cpp' object='Basics/libavocadodb_a-WriteLocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-WriteLocker.obj `if test -f 'Basics/WriteLocker.cpp'; then $(CYGPATH_W) 'Basics/WriteLocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/WriteLocker.cpp'; fi` - -Basics/libavocadodb_a-WriteUnlocker.o: Basics/WriteUnlocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-WriteUnlocker.o -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-WriteUnlocker.Tpo -c -o Basics/libavocadodb_a-WriteUnlocker.o `test -f 'Basics/WriteUnlocker.cpp' || echo '$(srcdir)/'`Basics/WriteUnlocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-WriteUnlocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-WriteUnlocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/WriteUnlocker.cpp' object='Basics/libavocadodb_a-WriteUnlocker.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-WriteUnlocker.o `test -f 'Basics/WriteUnlocker.cpp' || echo '$(srcdir)/'`Basics/WriteUnlocker.cpp - -Basics/libavocadodb_a-WriteUnlocker.obj: Basics/WriteUnlocker.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Basics/libavocadodb_a-WriteUnlocker.obj -MD -MP -MF Basics/$(DEPDIR)/libavocadodb_a-WriteUnlocker.Tpo -c -o Basics/libavocadodb_a-WriteUnlocker.obj `if test -f 'Basics/WriteUnlocker.cpp'; then $(CYGPATH_W) 'Basics/WriteUnlocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/WriteUnlocker.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Basics/$(DEPDIR)/libavocadodb_a-WriteUnlocker.Tpo Basics/$(DEPDIR)/libavocadodb_a-WriteUnlocker.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Basics/WriteUnlocker.cpp' object='Basics/libavocadodb_a-WriteUnlocker.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Basics/libavocadodb_a-WriteUnlocker.obj `if test -f 'Basics/WriteUnlocker.cpp'; then $(CYGPATH_W) 'Basics/WriteUnlocker.cpp'; else $(CYGPATH_W) '$(srcdir)/Basics/WriteUnlocker.cpp'; fi` - -Dispatcher/libavocadodb_a-ApplicationServerDispatcher.o: Dispatcher/ApplicationServerDispatcher.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-ApplicationServerDispatcher.o -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcher.Tpo -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcher.o `test -f 'Dispatcher/ApplicationServerDispatcher.cpp' || echo '$(srcdir)/'`Dispatcher/ApplicationServerDispatcher.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcher.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcher.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/ApplicationServerDispatcher.cpp' object='Dispatcher/libavocadodb_a-ApplicationServerDispatcher.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcher.o `test -f 'Dispatcher/ApplicationServerDispatcher.cpp' || echo '$(srcdir)/'`Dispatcher/ApplicationServerDispatcher.cpp - -Dispatcher/libavocadodb_a-ApplicationServerDispatcher.obj: Dispatcher/ApplicationServerDispatcher.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-ApplicationServerDispatcher.obj -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcher.Tpo -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcher.obj `if test -f 'Dispatcher/ApplicationServerDispatcher.cpp'; then $(CYGPATH_W) 'Dispatcher/ApplicationServerDispatcher.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/ApplicationServerDispatcher.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcher.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcher.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/ApplicationServerDispatcher.cpp' object='Dispatcher/libavocadodb_a-ApplicationServerDispatcher.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcher.obj `if test -f 'Dispatcher/ApplicationServerDispatcher.cpp'; then $(CYGPATH_W) 'Dispatcher/ApplicationServerDispatcher.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/ApplicationServerDispatcher.cpp'; fi` - -Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.o: Dispatcher/ApplicationServerDispatcherImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.o -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcherImpl.Tpo -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.o `test -f 'Dispatcher/ApplicationServerDispatcherImpl.cpp' || echo '$(srcdir)/'`Dispatcher/ApplicationServerDispatcherImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcherImpl.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcherImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/ApplicationServerDispatcherImpl.cpp' object='Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.o `test -f 'Dispatcher/ApplicationServerDispatcherImpl.cpp' || echo '$(srcdir)/'`Dispatcher/ApplicationServerDispatcherImpl.cpp - -Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.obj: Dispatcher/ApplicationServerDispatcherImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.obj -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcherImpl.Tpo -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.obj `if test -f 'Dispatcher/ApplicationServerDispatcherImpl.cpp'; then $(CYGPATH_W) 'Dispatcher/ApplicationServerDispatcherImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/ApplicationServerDispatcherImpl.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcherImpl.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-ApplicationServerDispatcherImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/ApplicationServerDispatcherImpl.cpp' object='Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-ApplicationServerDispatcherImpl.obj `if test -f 'Dispatcher/ApplicationServerDispatcherImpl.cpp'; then $(CYGPATH_W) 'Dispatcher/ApplicationServerDispatcherImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/ApplicationServerDispatcherImpl.cpp'; fi` - -Dispatcher/libavocadodb_a-DispatcherImpl.o: Dispatcher/DispatcherImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-DispatcherImpl.o -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherImpl.Tpo -c -o Dispatcher/libavocadodb_a-DispatcherImpl.o `test -f 'Dispatcher/DispatcherImpl.cpp' || echo '$(srcdir)/'`Dispatcher/DispatcherImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherImpl.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/DispatcherImpl.cpp' object='Dispatcher/libavocadodb_a-DispatcherImpl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-DispatcherImpl.o `test -f 'Dispatcher/DispatcherImpl.cpp' || echo '$(srcdir)/'`Dispatcher/DispatcherImpl.cpp - -Dispatcher/libavocadodb_a-DispatcherImpl.obj: Dispatcher/DispatcherImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-DispatcherImpl.obj -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherImpl.Tpo -c -o Dispatcher/libavocadodb_a-DispatcherImpl.obj `if test -f 'Dispatcher/DispatcherImpl.cpp'; then $(CYGPATH_W) 'Dispatcher/DispatcherImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/DispatcherImpl.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherImpl.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/DispatcherImpl.cpp' object='Dispatcher/libavocadodb_a-DispatcherImpl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-DispatcherImpl.obj `if test -f 'Dispatcher/DispatcherImpl.cpp'; then $(CYGPATH_W) 'Dispatcher/DispatcherImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/DispatcherImpl.cpp'; fi` - -Dispatcher/libavocadodb_a-DispatcherQueue.o: Dispatcher/DispatcherQueue.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-DispatcherQueue.o -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherQueue.Tpo -c -o Dispatcher/libavocadodb_a-DispatcherQueue.o `test -f 'Dispatcher/DispatcherQueue.cpp' || echo '$(srcdir)/'`Dispatcher/DispatcherQueue.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherQueue.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherQueue.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/DispatcherQueue.cpp' object='Dispatcher/libavocadodb_a-DispatcherQueue.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-DispatcherQueue.o `test -f 'Dispatcher/DispatcherQueue.cpp' || echo '$(srcdir)/'`Dispatcher/DispatcherQueue.cpp - -Dispatcher/libavocadodb_a-DispatcherQueue.obj: Dispatcher/DispatcherQueue.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-DispatcherQueue.obj -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherQueue.Tpo -c -o Dispatcher/libavocadodb_a-DispatcherQueue.obj `if test -f 'Dispatcher/DispatcherQueue.cpp'; then $(CYGPATH_W) 'Dispatcher/DispatcherQueue.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/DispatcherQueue.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherQueue.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherQueue.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/DispatcherQueue.cpp' object='Dispatcher/libavocadodb_a-DispatcherQueue.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-DispatcherQueue.obj `if test -f 'Dispatcher/DispatcherQueue.cpp'; then $(CYGPATH_W) 'Dispatcher/DispatcherQueue.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/DispatcherQueue.cpp'; fi` - -Dispatcher/libavocadodb_a-DispatcherThread.o: Dispatcher/DispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-DispatcherThread.o -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherThread.Tpo -c -o Dispatcher/libavocadodb_a-DispatcherThread.o `test -f 'Dispatcher/DispatcherThread.cpp' || echo '$(srcdir)/'`Dispatcher/DispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherThread.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/DispatcherThread.cpp' object='Dispatcher/libavocadodb_a-DispatcherThread.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-DispatcherThread.o `test -f 'Dispatcher/DispatcherThread.cpp' || echo '$(srcdir)/'`Dispatcher/DispatcherThread.cpp - -Dispatcher/libavocadodb_a-DispatcherThread.obj: Dispatcher/DispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-DispatcherThread.obj -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherThread.Tpo -c -o Dispatcher/libavocadodb_a-DispatcherThread.obj `if test -f 'Dispatcher/DispatcherThread.cpp'; then $(CYGPATH_W) 'Dispatcher/DispatcherThread.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/DispatcherThread.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherThread.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-DispatcherThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/DispatcherThread.cpp' object='Dispatcher/libavocadodb_a-DispatcherThread.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-DispatcherThread.obj `if test -f 'Dispatcher/DispatcherThread.cpp'; then $(CYGPATH_W) 'Dispatcher/DispatcherThread.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/DispatcherThread.cpp'; fi` - -Dispatcher/libavocadodb_a-Job.o: Dispatcher/Job.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-Job.o -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-Job.Tpo -c -o Dispatcher/libavocadodb_a-Job.o `test -f 'Dispatcher/Job.cpp' || echo '$(srcdir)/'`Dispatcher/Job.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-Job.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-Job.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/Job.cpp' object='Dispatcher/libavocadodb_a-Job.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-Job.o `test -f 'Dispatcher/Job.cpp' || echo '$(srcdir)/'`Dispatcher/Job.cpp - -Dispatcher/libavocadodb_a-Job.obj: Dispatcher/Job.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Dispatcher/libavocadodb_a-Job.obj -MD -MP -MF Dispatcher/$(DEPDIR)/libavocadodb_a-Job.Tpo -c -o Dispatcher/libavocadodb_a-Job.obj `if test -f 'Dispatcher/Job.cpp'; then $(CYGPATH_W) 'Dispatcher/Job.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/Job.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Dispatcher/$(DEPDIR)/libavocadodb_a-Job.Tpo Dispatcher/$(DEPDIR)/libavocadodb_a-Job.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Dispatcher/Job.cpp' object='Dispatcher/libavocadodb_a-Job.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Dispatcher/libavocadodb_a-Job.obj `if test -f 'Dispatcher/Job.cpp'; then $(CYGPATH_W) 'Dispatcher/Job.cpp'; else $(CYGPATH_W) '$(srcdir)/Dispatcher/Job.cpp'; fi` - -GeneralServer/libavocadodb_a-GeneralFigures.o: GeneralServer/GeneralFigures.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GeneralServer/libavocadodb_a-GeneralFigures.o -MD -MP -MF GeneralServer/$(DEPDIR)/libavocadodb_a-GeneralFigures.Tpo -c -o GeneralServer/libavocadodb_a-GeneralFigures.o `test -f 'GeneralServer/GeneralFigures.cpp' || echo '$(srcdir)/'`GeneralServer/GeneralFigures.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) GeneralServer/$(DEPDIR)/libavocadodb_a-GeneralFigures.Tpo GeneralServer/$(DEPDIR)/libavocadodb_a-GeneralFigures.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GeneralServer/GeneralFigures.cpp' object='GeneralServer/libavocadodb_a-GeneralFigures.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GeneralServer/libavocadodb_a-GeneralFigures.o `test -f 'GeneralServer/GeneralFigures.cpp' || echo '$(srcdir)/'`GeneralServer/GeneralFigures.cpp - -GeneralServer/libavocadodb_a-GeneralFigures.obj: GeneralServer/GeneralFigures.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GeneralServer/libavocadodb_a-GeneralFigures.obj -MD -MP -MF GeneralServer/$(DEPDIR)/libavocadodb_a-GeneralFigures.Tpo -c -o GeneralServer/libavocadodb_a-GeneralFigures.obj `if test -f 'GeneralServer/GeneralFigures.cpp'; then $(CYGPATH_W) 'GeneralServer/GeneralFigures.cpp'; else $(CYGPATH_W) '$(srcdir)/GeneralServer/GeneralFigures.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) GeneralServer/$(DEPDIR)/libavocadodb_a-GeneralFigures.Tpo GeneralServer/$(DEPDIR)/libavocadodb_a-GeneralFigures.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GeneralServer/GeneralFigures.cpp' object='GeneralServer/libavocadodb_a-GeneralFigures.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GeneralServer/libavocadodb_a-GeneralFigures.obj `if test -f 'GeneralServer/GeneralFigures.cpp'; then $(CYGPATH_W) 'GeneralServer/GeneralFigures.cpp'; else $(CYGPATH_W) '$(srcdir)/GeneralServer/GeneralFigures.cpp'; fi` - -HttpServer/libavocadodb_a-ApplicationHttpServer.o: HttpServer/ApplicationHttpServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-ApplicationHttpServer.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServer.Tpo -c -o HttpServer/libavocadodb_a-ApplicationHttpServer.o `test -f 'HttpServer/ApplicationHttpServer.cpp' || echo '$(srcdir)/'`HttpServer/ApplicationHttpServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServer.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/ApplicationHttpServer.cpp' object='HttpServer/libavocadodb_a-ApplicationHttpServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-ApplicationHttpServer.o `test -f 'HttpServer/ApplicationHttpServer.cpp' || echo '$(srcdir)/'`HttpServer/ApplicationHttpServer.cpp - -HttpServer/libavocadodb_a-ApplicationHttpServer.obj: HttpServer/ApplicationHttpServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-ApplicationHttpServer.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServer.Tpo -c -o HttpServer/libavocadodb_a-ApplicationHttpServer.obj `if test -f 'HttpServer/ApplicationHttpServer.cpp'; then $(CYGPATH_W) 'HttpServer/ApplicationHttpServer.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/ApplicationHttpServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServer.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/ApplicationHttpServer.cpp' object='HttpServer/libavocadodb_a-ApplicationHttpServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-ApplicationHttpServer.obj `if test -f 'HttpServer/ApplicationHttpServer.cpp'; then $(CYGPATH_W) 'HttpServer/ApplicationHttpServer.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/ApplicationHttpServer.cpp'; fi` - -HttpServer/libavocadodb_a-ApplicationHttpServerImpl.o: HttpServer/ApplicationHttpServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-ApplicationHttpServerImpl.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServerImpl.Tpo -c -o HttpServer/libavocadodb_a-ApplicationHttpServerImpl.o `test -f 'HttpServer/ApplicationHttpServerImpl.cpp' || echo '$(srcdir)/'`HttpServer/ApplicationHttpServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServerImpl.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/ApplicationHttpServerImpl.cpp' object='HttpServer/libavocadodb_a-ApplicationHttpServerImpl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-ApplicationHttpServerImpl.o `test -f 'HttpServer/ApplicationHttpServerImpl.cpp' || echo '$(srcdir)/'`HttpServer/ApplicationHttpServerImpl.cpp - -HttpServer/libavocadodb_a-ApplicationHttpServerImpl.obj: HttpServer/ApplicationHttpServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-ApplicationHttpServerImpl.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServerImpl.Tpo -c -o HttpServer/libavocadodb_a-ApplicationHttpServerImpl.obj `if test -f 'HttpServer/ApplicationHttpServerImpl.cpp'; then $(CYGPATH_W) 'HttpServer/ApplicationHttpServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/ApplicationHttpServerImpl.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServerImpl.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/ApplicationHttpServerImpl.cpp' object='HttpServer/libavocadodb_a-ApplicationHttpServerImpl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-ApplicationHttpServerImpl.obj `if test -f 'HttpServer/ApplicationHttpServerImpl.cpp'; then $(CYGPATH_W) 'HttpServer/ApplicationHttpServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/ApplicationHttpServerImpl.cpp'; fi` - -HttpServer/libavocadodb_a-HttpCommTask.o: HttpServer/HttpCommTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-HttpCommTask.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-HttpCommTask.Tpo -c -o HttpServer/libavocadodb_a-HttpCommTask.o `test -f 'HttpServer/HttpCommTask.cpp' || echo '$(srcdir)/'`HttpServer/HttpCommTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-HttpCommTask.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-HttpCommTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/HttpCommTask.cpp' object='HttpServer/libavocadodb_a-HttpCommTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-HttpCommTask.o `test -f 'HttpServer/HttpCommTask.cpp' || echo '$(srcdir)/'`HttpServer/HttpCommTask.cpp - -HttpServer/libavocadodb_a-HttpCommTask.obj: HttpServer/HttpCommTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-HttpCommTask.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-HttpCommTask.Tpo -c -o HttpServer/libavocadodb_a-HttpCommTask.obj `if test -f 'HttpServer/HttpCommTask.cpp'; then $(CYGPATH_W) 'HttpServer/HttpCommTask.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/HttpCommTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-HttpCommTask.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-HttpCommTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/HttpCommTask.cpp' object='HttpServer/libavocadodb_a-HttpCommTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-HttpCommTask.obj `if test -f 'HttpServer/HttpCommTask.cpp'; then $(CYGPATH_W) 'HttpServer/HttpCommTask.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/HttpCommTask.cpp'; fi` - -HttpServer/libavocadodb_a-HttpHandler.o: HttpServer/HttpHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-HttpHandler.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandler.Tpo -c -o HttpServer/libavocadodb_a-HttpHandler.o `test -f 'HttpServer/HttpHandler.cpp' || echo '$(srcdir)/'`HttpServer/HttpHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/HttpHandler.cpp' object='HttpServer/libavocadodb_a-HttpHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-HttpHandler.o `test -f 'HttpServer/HttpHandler.cpp' || echo '$(srcdir)/'`HttpServer/HttpHandler.cpp - -HttpServer/libavocadodb_a-HttpHandler.obj: HttpServer/HttpHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-HttpHandler.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandler.Tpo -c -o HttpServer/libavocadodb_a-HttpHandler.obj `if test -f 'HttpServer/HttpHandler.cpp'; then $(CYGPATH_W) 'HttpServer/HttpHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/HttpHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/HttpHandler.cpp' object='HttpServer/libavocadodb_a-HttpHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-HttpHandler.obj `if test -f 'HttpServer/HttpHandler.cpp'; then $(CYGPATH_W) 'HttpServer/HttpHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/HttpHandler.cpp'; fi` - -HttpServer/libavocadodb_a-HttpHandlerFactory.o: HttpServer/HttpHandlerFactory.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-HttpHandlerFactory.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandlerFactory.Tpo -c -o HttpServer/libavocadodb_a-HttpHandlerFactory.o `test -f 'HttpServer/HttpHandlerFactory.cpp' || echo '$(srcdir)/'`HttpServer/HttpHandlerFactory.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandlerFactory.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandlerFactory.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/HttpHandlerFactory.cpp' object='HttpServer/libavocadodb_a-HttpHandlerFactory.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-HttpHandlerFactory.o `test -f 'HttpServer/HttpHandlerFactory.cpp' || echo '$(srcdir)/'`HttpServer/HttpHandlerFactory.cpp - -HttpServer/libavocadodb_a-HttpHandlerFactory.obj: HttpServer/HttpHandlerFactory.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-HttpHandlerFactory.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandlerFactory.Tpo -c -o HttpServer/libavocadodb_a-HttpHandlerFactory.obj `if test -f 'HttpServer/HttpHandlerFactory.cpp'; then $(CYGPATH_W) 'HttpServer/HttpHandlerFactory.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/HttpHandlerFactory.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandlerFactory.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-HttpHandlerFactory.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/HttpHandlerFactory.cpp' object='HttpServer/libavocadodb_a-HttpHandlerFactory.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-HttpHandlerFactory.obj `if test -f 'HttpServer/HttpHandlerFactory.cpp'; then $(CYGPATH_W) 'HttpServer/HttpHandlerFactory.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/HttpHandlerFactory.cpp'; fi` - -HttpServer/libavocadodb_a-PathHandler.o: HttpServer/PathHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-PathHandler.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-PathHandler.Tpo -c -o HttpServer/libavocadodb_a-PathHandler.o `test -f 'HttpServer/PathHandler.cpp' || echo '$(srcdir)/'`HttpServer/PathHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-PathHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-PathHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/PathHandler.cpp' object='HttpServer/libavocadodb_a-PathHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-PathHandler.o `test -f 'HttpServer/PathHandler.cpp' || echo '$(srcdir)/'`HttpServer/PathHandler.cpp - -HttpServer/libavocadodb_a-PathHandler.obj: HttpServer/PathHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-PathHandler.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-PathHandler.Tpo -c -o HttpServer/libavocadodb_a-PathHandler.obj `if test -f 'HttpServer/PathHandler.cpp'; then $(CYGPATH_W) 'HttpServer/PathHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/PathHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-PathHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-PathHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/PathHandler.cpp' object='HttpServer/libavocadodb_a-PathHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-PathHandler.obj `if test -f 'HttpServer/PathHandler.cpp'; then $(CYGPATH_W) 'HttpServer/PathHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/PathHandler.cpp'; fi` - -HttpServer/libavocadodb_a-RedirectHandler.o: HttpServer/RedirectHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-RedirectHandler.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-RedirectHandler.Tpo -c -o HttpServer/libavocadodb_a-RedirectHandler.o `test -f 'HttpServer/RedirectHandler.cpp' || echo '$(srcdir)/'`HttpServer/RedirectHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-RedirectHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-RedirectHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/RedirectHandler.cpp' object='HttpServer/libavocadodb_a-RedirectHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-RedirectHandler.o `test -f 'HttpServer/RedirectHandler.cpp' || echo '$(srcdir)/'`HttpServer/RedirectHandler.cpp - -HttpServer/libavocadodb_a-RedirectHandler.obj: HttpServer/RedirectHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-RedirectHandler.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-RedirectHandler.Tpo -c -o HttpServer/libavocadodb_a-RedirectHandler.obj `if test -f 'HttpServer/RedirectHandler.cpp'; then $(CYGPATH_W) 'HttpServer/RedirectHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/RedirectHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-RedirectHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-RedirectHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/RedirectHandler.cpp' object='HttpServer/libavocadodb_a-RedirectHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-RedirectHandler.obj `if test -f 'HttpServer/RedirectHandler.cpp'; then $(CYGPATH_W) 'HttpServer/RedirectHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/RedirectHandler.cpp'; fi` - -HttpServer/libavocadodb_a-ServiceUnavailableHandler.o: HttpServer/ServiceUnavailableHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-ServiceUnavailableHandler.o -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-ServiceUnavailableHandler.Tpo -c -o HttpServer/libavocadodb_a-ServiceUnavailableHandler.o `test -f 'HttpServer/ServiceUnavailableHandler.cpp' || echo '$(srcdir)/'`HttpServer/ServiceUnavailableHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-ServiceUnavailableHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-ServiceUnavailableHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/ServiceUnavailableHandler.cpp' object='HttpServer/libavocadodb_a-ServiceUnavailableHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-ServiceUnavailableHandler.o `test -f 'HttpServer/ServiceUnavailableHandler.cpp' || echo '$(srcdir)/'`HttpServer/ServiceUnavailableHandler.cpp - -HttpServer/libavocadodb_a-ServiceUnavailableHandler.obj: HttpServer/ServiceUnavailableHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpServer/libavocadodb_a-ServiceUnavailableHandler.obj -MD -MP -MF HttpServer/$(DEPDIR)/libavocadodb_a-ServiceUnavailableHandler.Tpo -c -o HttpServer/libavocadodb_a-ServiceUnavailableHandler.obj `if test -f 'HttpServer/ServiceUnavailableHandler.cpp'; then $(CYGPATH_W) 'HttpServer/ServiceUnavailableHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/ServiceUnavailableHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpServer/$(DEPDIR)/libavocadodb_a-ServiceUnavailableHandler.Tpo HttpServer/$(DEPDIR)/libavocadodb_a-ServiceUnavailableHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpServer/ServiceUnavailableHandler.cpp' object='HttpServer/libavocadodb_a-ServiceUnavailableHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpServer/libavocadodb_a-ServiceUnavailableHandler.obj `if test -f 'HttpServer/ServiceUnavailableHandler.cpp'; then $(CYGPATH_W) 'HttpServer/ServiceUnavailableHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpServer/ServiceUnavailableHandler.cpp'; fi` - -HttpsServer/libavocadodb_a-ApplicationHttpsServer.o: HttpsServer/ApplicationHttpsServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-ApplicationHttpsServer.o -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServer.Tpo -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServer.o `test -f 'HttpsServer/ApplicationHttpsServer.cpp' || echo '$(srcdir)/'`HttpsServer/ApplicationHttpsServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServer.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/ApplicationHttpsServer.cpp' object='HttpsServer/libavocadodb_a-ApplicationHttpsServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServer.o `test -f 'HttpsServer/ApplicationHttpsServer.cpp' || echo '$(srcdir)/'`HttpsServer/ApplicationHttpsServer.cpp - -HttpsServer/libavocadodb_a-ApplicationHttpsServer.obj: HttpsServer/ApplicationHttpsServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-ApplicationHttpsServer.obj -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServer.Tpo -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServer.obj `if test -f 'HttpsServer/ApplicationHttpsServer.cpp'; then $(CYGPATH_W) 'HttpsServer/ApplicationHttpsServer.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/ApplicationHttpsServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServer.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/ApplicationHttpsServer.cpp' object='HttpsServer/libavocadodb_a-ApplicationHttpsServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServer.obj `if test -f 'HttpsServer/ApplicationHttpsServer.cpp'; then $(CYGPATH_W) 'HttpsServer/ApplicationHttpsServer.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/ApplicationHttpsServer.cpp'; fi` - -HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.o: HttpsServer/ApplicationHttpsServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.o -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServerImpl.Tpo -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.o `test -f 'HttpsServer/ApplicationHttpsServerImpl.cpp' || echo '$(srcdir)/'`HttpsServer/ApplicationHttpsServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServerImpl.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/ApplicationHttpsServerImpl.cpp' object='HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.o `test -f 'HttpsServer/ApplicationHttpsServerImpl.cpp' || echo '$(srcdir)/'`HttpsServer/ApplicationHttpsServerImpl.cpp - -HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.obj: HttpsServer/ApplicationHttpsServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.obj -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServerImpl.Tpo -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.obj `if test -f 'HttpsServer/ApplicationHttpsServerImpl.cpp'; then $(CYGPATH_W) 'HttpsServer/ApplicationHttpsServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/ApplicationHttpsServerImpl.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServerImpl.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-ApplicationHttpsServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/ApplicationHttpsServerImpl.cpp' object='HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-ApplicationHttpsServerImpl.obj `if test -f 'HttpsServer/ApplicationHttpsServerImpl.cpp'; then $(CYGPATH_W) 'HttpsServer/ApplicationHttpsServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/ApplicationHttpsServerImpl.cpp'; fi` - -HttpsServer/libavocadodb_a-HttpsAsyncCommTask.o: HttpsServer/HttpsAsyncCommTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-HttpsAsyncCommTask.o -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsAsyncCommTask.Tpo -c -o HttpsServer/libavocadodb_a-HttpsAsyncCommTask.o `test -f 'HttpsServer/HttpsAsyncCommTask.cpp' || echo '$(srcdir)/'`HttpsServer/HttpsAsyncCommTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsAsyncCommTask.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsAsyncCommTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/HttpsAsyncCommTask.cpp' object='HttpsServer/libavocadodb_a-HttpsAsyncCommTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-HttpsAsyncCommTask.o `test -f 'HttpsServer/HttpsAsyncCommTask.cpp' || echo '$(srcdir)/'`HttpsServer/HttpsAsyncCommTask.cpp - -HttpsServer/libavocadodb_a-HttpsAsyncCommTask.obj: HttpsServer/HttpsAsyncCommTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-HttpsAsyncCommTask.obj -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsAsyncCommTask.Tpo -c -o HttpsServer/libavocadodb_a-HttpsAsyncCommTask.obj `if test -f 'HttpsServer/HttpsAsyncCommTask.cpp'; then $(CYGPATH_W) 'HttpsServer/HttpsAsyncCommTask.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/HttpsAsyncCommTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsAsyncCommTask.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsAsyncCommTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/HttpsAsyncCommTask.cpp' object='HttpsServer/libavocadodb_a-HttpsAsyncCommTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-HttpsAsyncCommTask.obj `if test -f 'HttpsServer/HttpsAsyncCommTask.cpp'; then $(CYGPATH_W) 'HttpsServer/HttpsAsyncCommTask.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/HttpsAsyncCommTask.cpp'; fi` - -HttpsServer/libavocadodb_a-HttpsServer.o: HttpsServer/HttpsServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-HttpsServer.o -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServer.Tpo -c -o HttpsServer/libavocadodb_a-HttpsServer.o `test -f 'HttpsServer/HttpsServer.cpp' || echo '$(srcdir)/'`HttpsServer/HttpsServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServer.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/HttpsServer.cpp' object='HttpsServer/libavocadodb_a-HttpsServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-HttpsServer.o `test -f 'HttpsServer/HttpsServer.cpp' || echo '$(srcdir)/'`HttpsServer/HttpsServer.cpp - -HttpsServer/libavocadodb_a-HttpsServer.obj: HttpsServer/HttpsServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-HttpsServer.obj -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServer.Tpo -c -o HttpsServer/libavocadodb_a-HttpsServer.obj `if test -f 'HttpsServer/HttpsServer.cpp'; then $(CYGPATH_W) 'HttpsServer/HttpsServer.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/HttpsServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServer.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/HttpsServer.cpp' object='HttpsServer/libavocadodb_a-HttpsServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-HttpsServer.obj `if test -f 'HttpsServer/HttpsServer.cpp'; then $(CYGPATH_W) 'HttpsServer/HttpsServer.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/HttpsServer.cpp'; fi` - -HttpsServer/libavocadodb_a-HttpsServerImpl.o: HttpsServer/HttpsServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-HttpsServerImpl.o -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServerImpl.Tpo -c -o HttpsServer/libavocadodb_a-HttpsServerImpl.o `test -f 'HttpsServer/HttpsServerImpl.cpp' || echo '$(srcdir)/'`HttpsServer/HttpsServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServerImpl.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/HttpsServerImpl.cpp' object='HttpsServer/libavocadodb_a-HttpsServerImpl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-HttpsServerImpl.o `test -f 'HttpsServer/HttpsServerImpl.cpp' || echo '$(srcdir)/'`HttpsServer/HttpsServerImpl.cpp - -HttpsServer/libavocadodb_a-HttpsServerImpl.obj: HttpsServer/HttpsServerImpl.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT HttpsServer/libavocadodb_a-HttpsServerImpl.obj -MD -MP -MF HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServerImpl.Tpo -c -o HttpsServer/libavocadodb_a-HttpsServerImpl.obj `if test -f 'HttpsServer/HttpsServerImpl.cpp'; then $(CYGPATH_W) 'HttpsServer/HttpsServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/HttpsServerImpl.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServerImpl.Tpo HttpsServer/$(DEPDIR)/libavocadodb_a-HttpsServerImpl.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='HttpsServer/HttpsServerImpl.cpp' object='HttpsServer/libavocadodb_a-HttpsServerImpl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o HttpsServer/libavocadodb_a-HttpsServerImpl.obj `if test -f 'HttpsServer/HttpsServerImpl.cpp'; then $(CYGPATH_W) 'HttpsServer/HttpsServerImpl.cpp'; else $(CYGPATH_W) '$(srcdir)/HttpsServer/HttpsServerImpl.cpp'; fi` - -JsonParserX/libavocadodb_a-InputParser.o: JsonParserX/InputParser.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-InputParser.o -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-InputParser.Tpo -c -o JsonParserX/libavocadodb_a-InputParser.o `test -f 'JsonParserX/InputParser.cpp' || echo '$(srcdir)/'`JsonParserX/InputParser.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-InputParser.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-InputParser.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/InputParser.cpp' object='JsonParserX/libavocadodb_a-InputParser.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-InputParser.o `test -f 'JsonParserX/InputParser.cpp' || echo '$(srcdir)/'`JsonParserX/InputParser.cpp - -JsonParserX/libavocadodb_a-InputParser.obj: JsonParserX/InputParser.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-InputParser.obj -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-InputParser.Tpo -c -o JsonParserX/libavocadodb_a-InputParser.obj `if test -f 'JsonParserX/InputParser.cpp'; then $(CYGPATH_W) 'JsonParserX/InputParser.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/InputParser.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-InputParser.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-InputParser.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/InputParser.cpp' object='JsonParserX/libavocadodb_a-InputParser.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-InputParser.obj `if test -f 'JsonParserX/InputParser.cpp'; then $(CYGPATH_W) 'JsonParserX/InputParser.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/InputParser.cpp'; fi` - -JsonParserX/libavocadodb_a-JsonParserX.o: JsonParserX/JsonParserX.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-JsonParserX.o -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserX.Tpo -c -o JsonParserX/libavocadodb_a-JsonParserX.o `test -f 'JsonParserX/JsonParserX.cpp' || echo '$(srcdir)/'`JsonParserX/JsonParserX.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserX.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserX.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/JsonParserX.cpp' object='JsonParserX/libavocadodb_a-JsonParserX.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-JsonParserX.o `test -f 'JsonParserX/JsonParserX.cpp' || echo '$(srcdir)/'`JsonParserX/JsonParserX.cpp - -JsonParserX/libavocadodb_a-JsonParserX.obj: JsonParserX/JsonParserX.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-JsonParserX.obj -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserX.Tpo -c -o JsonParserX/libavocadodb_a-JsonParserX.obj `if test -f 'JsonParserX/JsonParserX.cpp'; then $(CYGPATH_W) 'JsonParserX/JsonParserX.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/JsonParserX.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserX.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserX.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/JsonParserX.cpp' object='JsonParserX/libavocadodb_a-JsonParserX.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-JsonParserX.obj `if test -f 'JsonParserX/JsonParserX.cpp'; then $(CYGPATH_W) 'JsonParserX/JsonParserX.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/JsonParserX.cpp'; fi` - -JsonParserX/libavocadodb_a-JsonParserXDriver.o: JsonParserX/JsonParserXDriver.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-JsonParserXDriver.o -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserXDriver.Tpo -c -o JsonParserX/libavocadodb_a-JsonParserXDriver.o `test -f 'JsonParserX/JsonParserXDriver.cpp' || echo '$(srcdir)/'`JsonParserX/JsonParserXDriver.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserXDriver.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserXDriver.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/JsonParserXDriver.cpp' object='JsonParserX/libavocadodb_a-JsonParserXDriver.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-JsonParserXDriver.o `test -f 'JsonParserX/JsonParserXDriver.cpp' || echo '$(srcdir)/'`JsonParserX/JsonParserXDriver.cpp - -JsonParserX/libavocadodb_a-JsonParserXDriver.obj: JsonParserX/JsonParserXDriver.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-JsonParserXDriver.obj -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserXDriver.Tpo -c -o JsonParserX/libavocadodb_a-JsonParserXDriver.obj `if test -f 'JsonParserX/JsonParserXDriver.cpp'; then $(CYGPATH_W) 'JsonParserX/JsonParserXDriver.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/JsonParserXDriver.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserXDriver.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-JsonParserXDriver.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/JsonParserXDriver.cpp' object='JsonParserX/libavocadodb_a-JsonParserXDriver.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-JsonParserXDriver.obj `if test -f 'JsonParserX/JsonParserXDriver.cpp'; then $(CYGPATH_W) 'JsonParserX/JsonParserXDriver.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/JsonParserXDriver.cpp'; fi` - -JsonParserX/libavocadodb_a-JsonScannerX.o: JsonParserX/JsonScannerX.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-JsonScannerX.o -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-JsonScannerX.Tpo -c -o JsonParserX/libavocadodb_a-JsonScannerX.o `test -f 'JsonParserX/JsonScannerX.cpp' || echo '$(srcdir)/'`JsonParserX/JsonScannerX.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-JsonScannerX.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-JsonScannerX.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/JsonScannerX.cpp' object='JsonParserX/libavocadodb_a-JsonScannerX.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-JsonScannerX.o `test -f 'JsonParserX/JsonScannerX.cpp' || echo '$(srcdir)/'`JsonParserX/JsonScannerX.cpp - -JsonParserX/libavocadodb_a-JsonScannerX.obj: JsonParserX/JsonScannerX.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT JsonParserX/libavocadodb_a-JsonScannerX.obj -MD -MP -MF JsonParserX/$(DEPDIR)/libavocadodb_a-JsonScannerX.Tpo -c -o JsonParserX/libavocadodb_a-JsonScannerX.obj `if test -f 'JsonParserX/JsonScannerX.cpp'; then $(CYGPATH_W) 'JsonParserX/JsonScannerX.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/JsonScannerX.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) JsonParserX/$(DEPDIR)/libavocadodb_a-JsonScannerX.Tpo JsonParserX/$(DEPDIR)/libavocadodb_a-JsonScannerX.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='JsonParserX/JsonScannerX.cpp' object='JsonParserX/libavocadodb_a-JsonScannerX.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o JsonParserX/libavocadodb_a-JsonScannerX.obj `if test -f 'JsonParserX/JsonScannerX.cpp'; then $(CYGPATH_W) 'JsonParserX/JsonScannerX.cpp'; else $(CYGPATH_W) '$(srcdir)/JsonParserX/JsonScannerX.cpp'; fi` - -Logger/libavocadodb_a-Logger.o: Logger/Logger.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-Logger.o -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-Logger.Tpo -c -o Logger/libavocadodb_a-Logger.o `test -f 'Logger/Logger.cpp' || echo '$(srcdir)/'`Logger/Logger.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-Logger.Tpo Logger/$(DEPDIR)/libavocadodb_a-Logger.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/Logger.cpp' object='Logger/libavocadodb_a-Logger.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-Logger.o `test -f 'Logger/Logger.cpp' || echo '$(srcdir)/'`Logger/Logger.cpp - -Logger/libavocadodb_a-Logger.obj: Logger/Logger.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-Logger.obj -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-Logger.Tpo -c -o Logger/libavocadodb_a-Logger.obj `if test -f 'Logger/Logger.cpp'; then $(CYGPATH_W) 'Logger/Logger.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/Logger.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-Logger.Tpo Logger/$(DEPDIR)/libavocadodb_a-Logger.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/Logger.cpp' object='Logger/libavocadodb_a-Logger.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-Logger.obj `if test -f 'Logger/Logger.cpp'; then $(CYGPATH_W) 'Logger/Logger.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/Logger.cpp'; fi` - -Logger/libavocadodb_a-LoggerData.o: Logger/LoggerData.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerData.o -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerData.Tpo -c -o Logger/libavocadodb_a-LoggerData.o `test -f 'Logger/LoggerData.cpp' || echo '$(srcdir)/'`Logger/LoggerData.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerData.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerData.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerData.cpp' object='Logger/libavocadodb_a-LoggerData.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerData.o `test -f 'Logger/LoggerData.cpp' || echo '$(srcdir)/'`Logger/LoggerData.cpp - -Logger/libavocadodb_a-LoggerData.obj: Logger/LoggerData.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerData.obj -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerData.Tpo -c -o Logger/libavocadodb_a-LoggerData.obj `if test -f 'Logger/LoggerData.cpp'; then $(CYGPATH_W) 'Logger/LoggerData.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerData.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerData.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerData.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerData.cpp' object='Logger/libavocadodb_a-LoggerData.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerData.obj `if test -f 'Logger/LoggerData.cpp'; then $(CYGPATH_W) 'Logger/LoggerData.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerData.cpp'; fi` - -Logger/libavocadodb_a-LoggerInfo.o: Logger/LoggerInfo.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerInfo.o -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerInfo.Tpo -c -o Logger/libavocadodb_a-LoggerInfo.o `test -f 'Logger/LoggerInfo.cpp' || echo '$(srcdir)/'`Logger/LoggerInfo.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerInfo.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerInfo.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerInfo.cpp' object='Logger/libavocadodb_a-LoggerInfo.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerInfo.o `test -f 'Logger/LoggerInfo.cpp' || echo '$(srcdir)/'`Logger/LoggerInfo.cpp - -Logger/libavocadodb_a-LoggerInfo.obj: Logger/LoggerInfo.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerInfo.obj -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerInfo.Tpo -c -o Logger/libavocadodb_a-LoggerInfo.obj `if test -f 'Logger/LoggerInfo.cpp'; then $(CYGPATH_W) 'Logger/LoggerInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerInfo.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerInfo.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerInfo.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerInfo.cpp' object='Logger/libavocadodb_a-LoggerInfo.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerInfo.obj `if test -f 'Logger/LoggerInfo.cpp'; then $(CYGPATH_W) 'Logger/LoggerInfo.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerInfo.cpp'; fi` - -Logger/libavocadodb_a-LoggerStream.o: Logger/LoggerStream.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerStream.o -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerStream.Tpo -c -o Logger/libavocadodb_a-LoggerStream.o `test -f 'Logger/LoggerStream.cpp' || echo '$(srcdir)/'`Logger/LoggerStream.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerStream.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerStream.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerStream.cpp' object='Logger/libavocadodb_a-LoggerStream.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerStream.o `test -f 'Logger/LoggerStream.cpp' || echo '$(srcdir)/'`Logger/LoggerStream.cpp - -Logger/libavocadodb_a-LoggerStream.obj: Logger/LoggerStream.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerStream.obj -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerStream.Tpo -c -o Logger/libavocadodb_a-LoggerStream.obj `if test -f 'Logger/LoggerStream.cpp'; then $(CYGPATH_W) 'Logger/LoggerStream.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerStream.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerStream.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerStream.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerStream.cpp' object='Logger/libavocadodb_a-LoggerStream.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerStream.obj `if test -f 'Logger/LoggerStream.cpp'; then $(CYGPATH_W) 'Logger/LoggerStream.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerStream.cpp'; fi` - -Logger/libavocadodb_a-LoggerTiming.o: Logger/LoggerTiming.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerTiming.o -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerTiming.Tpo -c -o Logger/libavocadodb_a-LoggerTiming.o `test -f 'Logger/LoggerTiming.cpp' || echo '$(srcdir)/'`Logger/LoggerTiming.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerTiming.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerTiming.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerTiming.cpp' object='Logger/libavocadodb_a-LoggerTiming.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerTiming.o `test -f 'Logger/LoggerTiming.cpp' || echo '$(srcdir)/'`Logger/LoggerTiming.cpp - -Logger/libavocadodb_a-LoggerTiming.obj: Logger/LoggerTiming.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Logger/libavocadodb_a-LoggerTiming.obj -MD -MP -MF Logger/$(DEPDIR)/libavocadodb_a-LoggerTiming.Tpo -c -o Logger/libavocadodb_a-LoggerTiming.obj `if test -f 'Logger/LoggerTiming.cpp'; then $(CYGPATH_W) 'Logger/LoggerTiming.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerTiming.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Logger/$(DEPDIR)/libavocadodb_a-LoggerTiming.Tpo Logger/$(DEPDIR)/libavocadodb_a-LoggerTiming.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Logger/LoggerTiming.cpp' object='Logger/libavocadodb_a-LoggerTiming.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Logger/libavocadodb_a-LoggerTiming.obj `if test -f 'Logger/LoggerTiming.cpp'; then $(CYGPATH_W) 'Logger/LoggerTiming.cpp'; else $(CYGPATH_W) '$(srcdir)/Logger/LoggerTiming.cpp'; fi` - -Rest/libavocadodb_a-AddressPort.o: Rest/AddressPort.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-AddressPort.o -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-AddressPort.Tpo -c -o Rest/libavocadodb_a-AddressPort.o `test -f 'Rest/AddressPort.cpp' || echo '$(srcdir)/'`Rest/AddressPort.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-AddressPort.Tpo Rest/$(DEPDIR)/libavocadodb_a-AddressPort.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/AddressPort.cpp' object='Rest/libavocadodb_a-AddressPort.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-AddressPort.o `test -f 'Rest/AddressPort.cpp' || echo '$(srcdir)/'`Rest/AddressPort.cpp - -Rest/libavocadodb_a-AddressPort.obj: Rest/AddressPort.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-AddressPort.obj -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-AddressPort.Tpo -c -o Rest/libavocadodb_a-AddressPort.obj `if test -f 'Rest/AddressPort.cpp'; then $(CYGPATH_W) 'Rest/AddressPort.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/AddressPort.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-AddressPort.Tpo Rest/$(DEPDIR)/libavocadodb_a-AddressPort.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/AddressPort.cpp' object='Rest/libavocadodb_a-AddressPort.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-AddressPort.obj `if test -f 'Rest/AddressPort.cpp'; then $(CYGPATH_W) 'Rest/AddressPort.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/AddressPort.cpp'; fi` - -Rest/libavocadodb_a-AnyServer.o: Rest/AnyServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-AnyServer.o -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-AnyServer.Tpo -c -o Rest/libavocadodb_a-AnyServer.o `test -f 'Rest/AnyServer.cpp' || echo '$(srcdir)/'`Rest/AnyServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-AnyServer.Tpo Rest/$(DEPDIR)/libavocadodb_a-AnyServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/AnyServer.cpp' object='Rest/libavocadodb_a-AnyServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-AnyServer.o `test -f 'Rest/AnyServer.cpp' || echo '$(srcdir)/'`Rest/AnyServer.cpp - -Rest/libavocadodb_a-AnyServer.obj: Rest/AnyServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-AnyServer.obj -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-AnyServer.Tpo -c -o Rest/libavocadodb_a-AnyServer.obj `if test -f 'Rest/AnyServer.cpp'; then $(CYGPATH_W) 'Rest/AnyServer.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/AnyServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-AnyServer.Tpo Rest/$(DEPDIR)/libavocadodb_a-AnyServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/AnyServer.cpp' object='Rest/libavocadodb_a-AnyServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-AnyServer.obj `if test -f 'Rest/AnyServer.cpp'; then $(CYGPATH_W) 'Rest/AnyServer.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/AnyServer.cpp'; fi` - -Rest/libavocadodb_a-HttpRequest.o: Rest/HttpRequest.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-HttpRequest.o -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-HttpRequest.Tpo -c -o Rest/libavocadodb_a-HttpRequest.o `test -f 'Rest/HttpRequest.cpp' || echo '$(srcdir)/'`Rest/HttpRequest.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-HttpRequest.Tpo Rest/$(DEPDIR)/libavocadodb_a-HttpRequest.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/HttpRequest.cpp' object='Rest/libavocadodb_a-HttpRequest.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-HttpRequest.o `test -f 'Rest/HttpRequest.cpp' || echo '$(srcdir)/'`Rest/HttpRequest.cpp - -Rest/libavocadodb_a-HttpRequest.obj: Rest/HttpRequest.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-HttpRequest.obj -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-HttpRequest.Tpo -c -o Rest/libavocadodb_a-HttpRequest.obj `if test -f 'Rest/HttpRequest.cpp'; then $(CYGPATH_W) 'Rest/HttpRequest.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/HttpRequest.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-HttpRequest.Tpo Rest/$(DEPDIR)/libavocadodb_a-HttpRequest.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/HttpRequest.cpp' object='Rest/libavocadodb_a-HttpRequest.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-HttpRequest.obj `if test -f 'Rest/HttpRequest.cpp'; then $(CYGPATH_W) 'Rest/HttpRequest.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/HttpRequest.cpp'; fi` - -Rest/libavocadodb_a-HttpResponse.o: Rest/HttpResponse.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-HttpResponse.o -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-HttpResponse.Tpo -c -o Rest/libavocadodb_a-HttpResponse.o `test -f 'Rest/HttpResponse.cpp' || echo '$(srcdir)/'`Rest/HttpResponse.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-HttpResponse.Tpo Rest/$(DEPDIR)/libavocadodb_a-HttpResponse.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/HttpResponse.cpp' object='Rest/libavocadodb_a-HttpResponse.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-HttpResponse.o `test -f 'Rest/HttpResponse.cpp' || echo '$(srcdir)/'`Rest/HttpResponse.cpp - -Rest/libavocadodb_a-HttpResponse.obj: Rest/HttpResponse.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-HttpResponse.obj -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-HttpResponse.Tpo -c -o Rest/libavocadodb_a-HttpResponse.obj `if test -f 'Rest/HttpResponse.cpp'; then $(CYGPATH_W) 'Rest/HttpResponse.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/HttpResponse.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-HttpResponse.Tpo Rest/$(DEPDIR)/libavocadodb_a-HttpResponse.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/HttpResponse.cpp' object='Rest/libavocadodb_a-HttpResponse.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-HttpResponse.obj `if test -f 'Rest/HttpResponse.cpp'; then $(CYGPATH_W) 'Rest/HttpResponse.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/HttpResponse.cpp'; fi` - -Rest/libavocadodb_a-Initialise.o: Rest/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-Initialise.o -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-Initialise.Tpo -c -o Rest/libavocadodb_a-Initialise.o `test -f 'Rest/Initialise.cpp' || echo '$(srcdir)/'`Rest/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-Initialise.Tpo Rest/$(DEPDIR)/libavocadodb_a-Initialise.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/Initialise.cpp' object='Rest/libavocadodb_a-Initialise.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-Initialise.o `test -f 'Rest/Initialise.cpp' || echo '$(srcdir)/'`Rest/Initialise.cpp - -Rest/libavocadodb_a-Initialise.obj: Rest/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-Initialise.obj -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-Initialise.Tpo -c -o Rest/libavocadodb_a-Initialise.obj `if test -f 'Rest/Initialise.cpp'; then $(CYGPATH_W) 'Rest/Initialise.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/Initialise.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-Initialise.Tpo Rest/$(DEPDIR)/libavocadodb_a-Initialise.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/Initialise.cpp' object='Rest/libavocadodb_a-Initialise.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-Initialise.obj `if test -f 'Rest/Initialise.cpp'; then $(CYGPATH_W) 'Rest/Initialise.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/Initialise.cpp'; fi` - -Rest/libavocadodb_a-SslInterface.o: Rest/SslInterface.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-SslInterface.o -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-SslInterface.Tpo -c -o Rest/libavocadodb_a-SslInterface.o `test -f 'Rest/SslInterface.cpp' || echo '$(srcdir)/'`Rest/SslInterface.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-SslInterface.Tpo Rest/$(DEPDIR)/libavocadodb_a-SslInterface.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/SslInterface.cpp' object='Rest/libavocadodb_a-SslInterface.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-SslInterface.o `test -f 'Rest/SslInterface.cpp' || echo '$(srcdir)/'`Rest/SslInterface.cpp - -Rest/libavocadodb_a-SslInterface.obj: Rest/SslInterface.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-SslInterface.obj -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-SslInterface.Tpo -c -o Rest/libavocadodb_a-SslInterface.obj `if test -f 'Rest/SslInterface.cpp'; then $(CYGPATH_W) 'Rest/SslInterface.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/SslInterface.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-SslInterface.Tpo Rest/$(DEPDIR)/libavocadodb_a-SslInterface.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/SslInterface.cpp' object='Rest/libavocadodb_a-SslInterface.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-SslInterface.obj `if test -f 'Rest/SslInterface.cpp'; then $(CYGPATH_W) 'Rest/SslInterface.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/SslInterface.cpp'; fi` - -Rest/libavocadodb_a-Url.o: Rest/Url.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-Url.o -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-Url.Tpo -c -o Rest/libavocadodb_a-Url.o `test -f 'Rest/Url.cpp' || echo '$(srcdir)/'`Rest/Url.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-Url.Tpo Rest/$(DEPDIR)/libavocadodb_a-Url.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/Url.cpp' object='Rest/libavocadodb_a-Url.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-Url.o `test -f 'Rest/Url.cpp' || echo '$(srcdir)/'`Rest/Url.cpp - -Rest/libavocadodb_a-Url.obj: Rest/Url.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rest/libavocadodb_a-Url.obj -MD -MP -MF Rest/$(DEPDIR)/libavocadodb_a-Url.Tpo -c -o Rest/libavocadodb_a-Url.obj `if test -f 'Rest/Url.cpp'; then $(CYGPATH_W) 'Rest/Url.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/Url.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Rest/$(DEPDIR)/libavocadodb_a-Url.Tpo Rest/$(DEPDIR)/libavocadodb_a-Url.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rest/Url.cpp' object='Rest/libavocadodb_a-Url.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rest/libavocadodb_a-Url.obj `if test -f 'Rest/Url.cpp'; then $(CYGPATH_W) 'Rest/Url.cpp'; else $(CYGPATH_W) '$(srcdir)/Rest/Url.cpp'; fi` - -ResultGenerator/libavocadodb_a-HtmlResultGenerator.o: ResultGenerator/HtmlResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-HtmlResultGenerator.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-HtmlResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-HtmlResultGenerator.o `test -f 'ResultGenerator/HtmlResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/HtmlResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-HtmlResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-HtmlResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/HtmlResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-HtmlResultGenerator.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-HtmlResultGenerator.o `test -f 'ResultGenerator/HtmlResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/HtmlResultGenerator.cpp - -ResultGenerator/libavocadodb_a-HtmlResultGenerator.obj: ResultGenerator/HtmlResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-HtmlResultGenerator.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-HtmlResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-HtmlResultGenerator.obj `if test -f 'ResultGenerator/HtmlResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/HtmlResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/HtmlResultGenerator.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-HtmlResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-HtmlResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/HtmlResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-HtmlResultGenerator.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-HtmlResultGenerator.obj `if test -f 'ResultGenerator/HtmlResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/HtmlResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/HtmlResultGenerator.cpp'; fi` - -ResultGenerator/libavocadodb_a-Initialise.o: ResultGenerator/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-Initialise.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-Initialise.Tpo -c -o ResultGenerator/libavocadodb_a-Initialise.o `test -f 'ResultGenerator/Initialise.cpp' || echo '$(srcdir)/'`ResultGenerator/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-Initialise.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-Initialise.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/Initialise.cpp' object='ResultGenerator/libavocadodb_a-Initialise.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-Initialise.o `test -f 'ResultGenerator/Initialise.cpp' || echo '$(srcdir)/'`ResultGenerator/Initialise.cpp - -ResultGenerator/libavocadodb_a-Initialise.obj: ResultGenerator/Initialise.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-Initialise.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-Initialise.Tpo -c -o ResultGenerator/libavocadodb_a-Initialise.obj `if test -f 'ResultGenerator/Initialise.cpp'; then $(CYGPATH_W) 'ResultGenerator/Initialise.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/Initialise.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-Initialise.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-Initialise.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/Initialise.cpp' object='ResultGenerator/libavocadodb_a-Initialise.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-Initialise.obj `if test -f 'ResultGenerator/Initialise.cpp'; then $(CYGPATH_W) 'ResultGenerator/Initialise.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/Initialise.cpp'; fi` - -ResultGenerator/libavocadodb_a-JsonResultGenerator.o: ResultGenerator/JsonResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-JsonResultGenerator.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-JsonResultGenerator.o `test -f 'ResultGenerator/JsonResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/JsonResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/JsonResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-JsonResultGenerator.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-JsonResultGenerator.o `test -f 'ResultGenerator/JsonResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/JsonResultGenerator.cpp - -ResultGenerator/libavocadodb_a-JsonResultGenerator.obj: ResultGenerator/JsonResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-JsonResultGenerator.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-JsonResultGenerator.obj `if test -f 'ResultGenerator/JsonResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/JsonResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/JsonResultGenerator.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/JsonResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-JsonResultGenerator.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-JsonResultGenerator.obj `if test -f 'ResultGenerator/JsonResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/JsonResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/JsonResultGenerator.cpp'; fi` - -ResultGenerator/libavocadodb_a-JsonXResultGenerator.o: ResultGenerator/JsonXResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-JsonXResultGenerator.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonXResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-JsonXResultGenerator.o `test -f 'ResultGenerator/JsonXResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/JsonXResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonXResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonXResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/JsonXResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-JsonXResultGenerator.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-JsonXResultGenerator.o `test -f 'ResultGenerator/JsonXResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/JsonXResultGenerator.cpp - -ResultGenerator/libavocadodb_a-JsonXResultGenerator.obj: ResultGenerator/JsonXResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-JsonXResultGenerator.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonXResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-JsonXResultGenerator.obj `if test -f 'ResultGenerator/JsonXResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/JsonXResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/JsonXResultGenerator.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonXResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-JsonXResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/JsonXResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-JsonXResultGenerator.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-JsonXResultGenerator.obj `if test -f 'ResultGenerator/JsonXResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/JsonXResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/JsonXResultGenerator.cpp'; fi` - -ResultGenerator/libavocadodb_a-OutputGenerator.o: ResultGenerator/OutputGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-OutputGenerator.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-OutputGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-OutputGenerator.o `test -f 'ResultGenerator/OutputGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/OutputGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-OutputGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-OutputGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/OutputGenerator.cpp' object='ResultGenerator/libavocadodb_a-OutputGenerator.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-OutputGenerator.o `test -f 'ResultGenerator/OutputGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/OutputGenerator.cpp - -ResultGenerator/libavocadodb_a-OutputGenerator.obj: ResultGenerator/OutputGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-OutputGenerator.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-OutputGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-OutputGenerator.obj `if test -f 'ResultGenerator/OutputGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/OutputGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/OutputGenerator.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-OutputGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-OutputGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/OutputGenerator.cpp' object='ResultGenerator/libavocadodb_a-OutputGenerator.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-OutputGenerator.obj `if test -f 'ResultGenerator/OutputGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/OutputGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/OutputGenerator.cpp'; fi` - -ResultGenerator/libavocadodb_a-PhpResultGenerator.o: ResultGenerator/PhpResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-PhpResultGenerator.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-PhpResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-PhpResultGenerator.o `test -f 'ResultGenerator/PhpResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/PhpResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-PhpResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-PhpResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/PhpResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-PhpResultGenerator.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-PhpResultGenerator.o `test -f 'ResultGenerator/PhpResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/PhpResultGenerator.cpp - -ResultGenerator/libavocadodb_a-PhpResultGenerator.obj: ResultGenerator/PhpResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-PhpResultGenerator.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-PhpResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-PhpResultGenerator.obj `if test -f 'ResultGenerator/PhpResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/PhpResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/PhpResultGenerator.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-PhpResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-PhpResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/PhpResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-PhpResultGenerator.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-PhpResultGenerator.obj `if test -f 'ResultGenerator/PhpResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/PhpResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/PhpResultGenerator.cpp'; fi` - -ResultGenerator/libavocadodb_a-ResultGenerator.o: ResultGenerator/ResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-ResultGenerator.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-ResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-ResultGenerator.o `test -f 'ResultGenerator/ResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/ResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-ResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-ResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/ResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-ResultGenerator.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-ResultGenerator.o `test -f 'ResultGenerator/ResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/ResultGenerator.cpp - -ResultGenerator/libavocadodb_a-ResultGenerator.obj: ResultGenerator/ResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-ResultGenerator.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-ResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-ResultGenerator.obj `if test -f 'ResultGenerator/ResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/ResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/ResultGenerator.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-ResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-ResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/ResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-ResultGenerator.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-ResultGenerator.obj `if test -f 'ResultGenerator/ResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/ResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/ResultGenerator.cpp'; fi` - -ResultGenerator/libavocadodb_a-XmlResultGenerator.o: ResultGenerator/XmlResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-XmlResultGenerator.o -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-XmlResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-XmlResultGenerator.o `test -f 'ResultGenerator/XmlResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/XmlResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-XmlResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-XmlResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/XmlResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-XmlResultGenerator.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-XmlResultGenerator.o `test -f 'ResultGenerator/XmlResultGenerator.cpp' || echo '$(srcdir)/'`ResultGenerator/XmlResultGenerator.cpp - -ResultGenerator/libavocadodb_a-XmlResultGenerator.obj: ResultGenerator/XmlResultGenerator.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ResultGenerator/libavocadodb_a-XmlResultGenerator.obj -MD -MP -MF ResultGenerator/$(DEPDIR)/libavocadodb_a-XmlResultGenerator.Tpo -c -o ResultGenerator/libavocadodb_a-XmlResultGenerator.obj `if test -f 'ResultGenerator/XmlResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/XmlResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/XmlResultGenerator.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ResultGenerator/$(DEPDIR)/libavocadodb_a-XmlResultGenerator.Tpo ResultGenerator/$(DEPDIR)/libavocadodb_a-XmlResultGenerator.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ResultGenerator/XmlResultGenerator.cpp' object='ResultGenerator/libavocadodb_a-XmlResultGenerator.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ResultGenerator/libavocadodb_a-XmlResultGenerator.obj `if test -f 'ResultGenerator/XmlResultGenerator.cpp'; then $(CYGPATH_W) 'ResultGenerator/XmlResultGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/ResultGenerator/XmlResultGenerator.cpp'; fi` - -Scheduler/libavocadodb_a-AsyncTask.o: Scheduler/AsyncTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-AsyncTask.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-AsyncTask.Tpo -c -o Scheduler/libavocadodb_a-AsyncTask.o `test -f 'Scheduler/AsyncTask.cpp' || echo '$(srcdir)/'`Scheduler/AsyncTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-AsyncTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-AsyncTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/AsyncTask.cpp' object='Scheduler/libavocadodb_a-AsyncTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-AsyncTask.o `test -f 'Scheduler/AsyncTask.cpp' || echo '$(srcdir)/'`Scheduler/AsyncTask.cpp - -Scheduler/libavocadodb_a-AsyncTask.obj: Scheduler/AsyncTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-AsyncTask.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-AsyncTask.Tpo -c -o Scheduler/libavocadodb_a-AsyncTask.obj `if test -f 'Scheduler/AsyncTask.cpp'; then $(CYGPATH_W) 'Scheduler/AsyncTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/AsyncTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-AsyncTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-AsyncTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/AsyncTask.cpp' object='Scheduler/libavocadodb_a-AsyncTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-AsyncTask.obj `if test -f 'Scheduler/AsyncTask.cpp'; then $(CYGPATH_W) 'Scheduler/AsyncTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/AsyncTask.cpp'; fi` - -Scheduler/libavocadodb_a-ConnectionTask.o: Scheduler/ConnectionTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-ConnectionTask.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-ConnectionTask.Tpo -c -o Scheduler/libavocadodb_a-ConnectionTask.o `test -f 'Scheduler/ConnectionTask.cpp' || echo '$(srcdir)/'`Scheduler/ConnectionTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-ConnectionTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-ConnectionTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/ConnectionTask.cpp' object='Scheduler/libavocadodb_a-ConnectionTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-ConnectionTask.o `test -f 'Scheduler/ConnectionTask.cpp' || echo '$(srcdir)/'`Scheduler/ConnectionTask.cpp - -Scheduler/libavocadodb_a-ConnectionTask.obj: Scheduler/ConnectionTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-ConnectionTask.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-ConnectionTask.Tpo -c -o Scheduler/libavocadodb_a-ConnectionTask.obj `if test -f 'Scheduler/ConnectionTask.cpp'; then $(CYGPATH_W) 'Scheduler/ConnectionTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/ConnectionTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-ConnectionTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-ConnectionTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/ConnectionTask.cpp' object='Scheduler/libavocadodb_a-ConnectionTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-ConnectionTask.obj `if test -f 'Scheduler/ConnectionTask.cpp'; then $(CYGPATH_W) 'Scheduler/ConnectionTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/ConnectionTask.cpp'; fi` - -Scheduler/libavocadodb_a-ListenTask.o: Scheduler/ListenTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-ListenTask.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-ListenTask.Tpo -c -o Scheduler/libavocadodb_a-ListenTask.o `test -f 'Scheduler/ListenTask.cpp' || echo '$(srcdir)/'`Scheduler/ListenTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-ListenTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-ListenTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/ListenTask.cpp' object='Scheduler/libavocadodb_a-ListenTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-ListenTask.o `test -f 'Scheduler/ListenTask.cpp' || echo '$(srcdir)/'`Scheduler/ListenTask.cpp - -Scheduler/libavocadodb_a-ListenTask.obj: Scheduler/ListenTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-ListenTask.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-ListenTask.Tpo -c -o Scheduler/libavocadodb_a-ListenTask.obj `if test -f 'Scheduler/ListenTask.cpp'; then $(CYGPATH_W) 'Scheduler/ListenTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/ListenTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-ListenTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-ListenTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/ListenTask.cpp' object='Scheduler/libavocadodb_a-ListenTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-ListenTask.obj `if test -f 'Scheduler/ListenTask.cpp'; then $(CYGPATH_W) 'Scheduler/ListenTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/ListenTask.cpp'; fi` - -Scheduler/libavocadodb_a-PeriodicTask.o: Scheduler/PeriodicTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-PeriodicTask.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-PeriodicTask.Tpo -c -o Scheduler/libavocadodb_a-PeriodicTask.o `test -f 'Scheduler/PeriodicTask.cpp' || echo '$(srcdir)/'`Scheduler/PeriodicTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-PeriodicTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-PeriodicTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/PeriodicTask.cpp' object='Scheduler/libavocadodb_a-PeriodicTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-PeriodicTask.o `test -f 'Scheduler/PeriodicTask.cpp' || echo '$(srcdir)/'`Scheduler/PeriodicTask.cpp - -Scheduler/libavocadodb_a-PeriodicTask.obj: Scheduler/PeriodicTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-PeriodicTask.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-PeriodicTask.Tpo -c -o Scheduler/libavocadodb_a-PeriodicTask.obj `if test -f 'Scheduler/PeriodicTask.cpp'; then $(CYGPATH_W) 'Scheduler/PeriodicTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/PeriodicTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-PeriodicTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-PeriodicTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/PeriodicTask.cpp' object='Scheduler/libavocadodb_a-PeriodicTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-PeriodicTask.obj `if test -f 'Scheduler/PeriodicTask.cpp'; then $(CYGPATH_W) 'Scheduler/PeriodicTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/PeriodicTask.cpp'; fi` - -Scheduler/libavocadodb_a-Scheduler.o: Scheduler/Scheduler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-Scheduler.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-Scheduler.Tpo -c -o Scheduler/libavocadodb_a-Scheduler.o `test -f 'Scheduler/Scheduler.cpp' || echo '$(srcdir)/'`Scheduler/Scheduler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-Scheduler.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-Scheduler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/Scheduler.cpp' object='Scheduler/libavocadodb_a-Scheduler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-Scheduler.o `test -f 'Scheduler/Scheduler.cpp' || echo '$(srcdir)/'`Scheduler/Scheduler.cpp - -Scheduler/libavocadodb_a-Scheduler.obj: Scheduler/Scheduler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-Scheduler.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-Scheduler.Tpo -c -o Scheduler/libavocadodb_a-Scheduler.obj `if test -f 'Scheduler/Scheduler.cpp'; then $(CYGPATH_W) 'Scheduler/Scheduler.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/Scheduler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-Scheduler.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-Scheduler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/Scheduler.cpp' object='Scheduler/libavocadodb_a-Scheduler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-Scheduler.obj `if test -f 'Scheduler/Scheduler.cpp'; then $(CYGPATH_W) 'Scheduler/Scheduler.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/Scheduler.cpp'; fi` - -Scheduler/libavocadodb_a-SchedulerLibev.o: Scheduler/SchedulerLibev.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SchedulerLibev.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerLibev.Tpo -c -o Scheduler/libavocadodb_a-SchedulerLibev.o `test -f 'Scheduler/SchedulerLibev.cpp' || echo '$(srcdir)/'`Scheduler/SchedulerLibev.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerLibev.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerLibev.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SchedulerLibev.cpp' object='Scheduler/libavocadodb_a-SchedulerLibev.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SchedulerLibev.o `test -f 'Scheduler/SchedulerLibev.cpp' || echo '$(srcdir)/'`Scheduler/SchedulerLibev.cpp - -Scheduler/libavocadodb_a-SchedulerLibev.obj: Scheduler/SchedulerLibev.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SchedulerLibev.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerLibev.Tpo -c -o Scheduler/libavocadodb_a-SchedulerLibev.obj `if test -f 'Scheduler/SchedulerLibev.cpp'; then $(CYGPATH_W) 'Scheduler/SchedulerLibev.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SchedulerLibev.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerLibev.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerLibev.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SchedulerLibev.cpp' object='Scheduler/libavocadodb_a-SchedulerLibev.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SchedulerLibev.obj `if test -f 'Scheduler/SchedulerLibev.cpp'; then $(CYGPATH_W) 'Scheduler/SchedulerLibev.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SchedulerLibev.cpp'; fi` - -Scheduler/libavocadodb_a-SchedulerThread.o: Scheduler/SchedulerThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SchedulerThread.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerThread.Tpo -c -o Scheduler/libavocadodb_a-SchedulerThread.o `test -f 'Scheduler/SchedulerThread.cpp' || echo '$(srcdir)/'`Scheduler/SchedulerThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerThread.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SchedulerThread.cpp' object='Scheduler/libavocadodb_a-SchedulerThread.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SchedulerThread.o `test -f 'Scheduler/SchedulerThread.cpp' || echo '$(srcdir)/'`Scheduler/SchedulerThread.cpp - -Scheduler/libavocadodb_a-SchedulerThread.obj: Scheduler/SchedulerThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SchedulerThread.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerThread.Tpo -c -o Scheduler/libavocadodb_a-SchedulerThread.obj `if test -f 'Scheduler/SchedulerThread.cpp'; then $(CYGPATH_W) 'Scheduler/SchedulerThread.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SchedulerThread.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerThread.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SchedulerThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SchedulerThread.cpp' object='Scheduler/libavocadodb_a-SchedulerThread.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SchedulerThread.obj `if test -f 'Scheduler/SchedulerThread.cpp'; then $(CYGPATH_W) 'Scheduler/SchedulerThread.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SchedulerThread.cpp'; fi` - -Scheduler/libavocadodb_a-SignalTask.o: Scheduler/SignalTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SignalTask.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SignalTask.Tpo -c -o Scheduler/libavocadodb_a-SignalTask.o `test -f 'Scheduler/SignalTask.cpp' || echo '$(srcdir)/'`Scheduler/SignalTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SignalTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SignalTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SignalTask.cpp' object='Scheduler/libavocadodb_a-SignalTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SignalTask.o `test -f 'Scheduler/SignalTask.cpp' || echo '$(srcdir)/'`Scheduler/SignalTask.cpp - -Scheduler/libavocadodb_a-SignalTask.obj: Scheduler/SignalTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SignalTask.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SignalTask.Tpo -c -o Scheduler/libavocadodb_a-SignalTask.obj `if test -f 'Scheduler/SignalTask.cpp'; then $(CYGPATH_W) 'Scheduler/SignalTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SignalTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SignalTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SignalTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SignalTask.cpp' object='Scheduler/libavocadodb_a-SignalTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SignalTask.obj `if test -f 'Scheduler/SignalTask.cpp'; then $(CYGPATH_W) 'Scheduler/SignalTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SignalTask.cpp'; fi` - -Scheduler/libavocadodb_a-SocketTask.o: Scheduler/SocketTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SocketTask.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SocketTask.Tpo -c -o Scheduler/libavocadodb_a-SocketTask.o `test -f 'Scheduler/SocketTask.cpp' || echo '$(srcdir)/'`Scheduler/SocketTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SocketTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SocketTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SocketTask.cpp' object='Scheduler/libavocadodb_a-SocketTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SocketTask.o `test -f 'Scheduler/SocketTask.cpp' || echo '$(srcdir)/'`Scheduler/SocketTask.cpp - -Scheduler/libavocadodb_a-SocketTask.obj: Scheduler/SocketTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-SocketTask.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-SocketTask.Tpo -c -o Scheduler/libavocadodb_a-SocketTask.obj `if test -f 'Scheduler/SocketTask.cpp'; then $(CYGPATH_W) 'Scheduler/SocketTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SocketTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-SocketTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-SocketTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/SocketTask.cpp' object='Scheduler/libavocadodb_a-SocketTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-SocketTask.obj `if test -f 'Scheduler/SocketTask.cpp'; then $(CYGPATH_W) 'Scheduler/SocketTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/SocketTask.cpp'; fi` - -Scheduler/libavocadodb_a-Task.o: Scheduler/Task.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-Task.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-Task.Tpo -c -o Scheduler/libavocadodb_a-Task.o `test -f 'Scheduler/Task.cpp' || echo '$(srcdir)/'`Scheduler/Task.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-Task.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-Task.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/Task.cpp' object='Scheduler/libavocadodb_a-Task.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-Task.o `test -f 'Scheduler/Task.cpp' || echo '$(srcdir)/'`Scheduler/Task.cpp - -Scheduler/libavocadodb_a-Task.obj: Scheduler/Task.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-Task.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-Task.Tpo -c -o Scheduler/libavocadodb_a-Task.obj `if test -f 'Scheduler/Task.cpp'; then $(CYGPATH_W) 'Scheduler/Task.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/Task.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-Task.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-Task.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/Task.cpp' object='Scheduler/libavocadodb_a-Task.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-Task.obj `if test -f 'Scheduler/Task.cpp'; then $(CYGPATH_W) 'Scheduler/Task.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/Task.cpp'; fi` - -Scheduler/libavocadodb_a-TimerTask.o: Scheduler/TimerTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-TimerTask.o -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-TimerTask.Tpo -c -o Scheduler/libavocadodb_a-TimerTask.o `test -f 'Scheduler/TimerTask.cpp' || echo '$(srcdir)/'`Scheduler/TimerTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-TimerTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-TimerTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/TimerTask.cpp' object='Scheduler/libavocadodb_a-TimerTask.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-TimerTask.o `test -f 'Scheduler/TimerTask.cpp' || echo '$(srcdir)/'`Scheduler/TimerTask.cpp - -Scheduler/libavocadodb_a-TimerTask.obj: Scheduler/TimerTask.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Scheduler/libavocadodb_a-TimerTask.obj -MD -MP -MF Scheduler/$(DEPDIR)/libavocadodb_a-TimerTask.Tpo -c -o Scheduler/libavocadodb_a-TimerTask.obj `if test -f 'Scheduler/TimerTask.cpp'; then $(CYGPATH_W) 'Scheduler/TimerTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/TimerTask.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Scheduler/$(DEPDIR)/libavocadodb_a-TimerTask.Tpo Scheduler/$(DEPDIR)/libavocadodb_a-TimerTask.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Scheduler/TimerTask.cpp' object='Scheduler/libavocadodb_a-TimerTask.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Scheduler/libavocadodb_a-TimerTask.obj `if test -f 'Scheduler/TimerTask.cpp'; then $(CYGPATH_W) 'Scheduler/TimerTask.cpp'; else $(CYGPATH_W) '$(srcdir)/Scheduler/TimerTask.cpp'; fi` - -V8/libavocadodb_a-v8-actions.o: V8/v8-actions.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-actions.o -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-actions.Tpo -c -o V8/libavocadodb_a-v8-actions.o `test -f 'V8/v8-actions.cpp' || echo '$(srcdir)/'`V8/v8-actions.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-actions.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-actions.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-actions.cpp' object='V8/libavocadodb_a-v8-actions.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-actions.o `test -f 'V8/v8-actions.cpp' || echo '$(srcdir)/'`V8/v8-actions.cpp - -V8/libavocadodb_a-v8-actions.obj: V8/v8-actions.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-actions.obj -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-actions.Tpo -c -o V8/libavocadodb_a-v8-actions.obj `if test -f 'V8/v8-actions.cpp'; then $(CYGPATH_W) 'V8/v8-actions.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-actions.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-actions.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-actions.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-actions.cpp' object='V8/libavocadodb_a-v8-actions.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-actions.obj `if test -f 'V8/v8-actions.cpp'; then $(CYGPATH_W) 'V8/v8-actions.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-actions.cpp'; fi` - -V8/libavocadodb_a-v8-json.o: V8/v8-json.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-json.o -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-json.Tpo -c -o V8/libavocadodb_a-v8-json.o `test -f 'V8/v8-json.cpp' || echo '$(srcdir)/'`V8/v8-json.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-json.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-json.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-json.cpp' object='V8/libavocadodb_a-v8-json.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-json.o `test -f 'V8/v8-json.cpp' || echo '$(srcdir)/'`V8/v8-json.cpp - -V8/libavocadodb_a-v8-json.obj: V8/v8-json.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-json.obj -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-json.Tpo -c -o V8/libavocadodb_a-v8-json.obj `if test -f 'V8/v8-json.cpp'; then $(CYGPATH_W) 'V8/v8-json.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-json.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-json.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-json.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-json.cpp' object='V8/libavocadodb_a-v8-json.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-json.obj `if test -f 'V8/v8-json.cpp'; then $(CYGPATH_W) 'V8/v8-json.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-json.cpp'; fi` - -V8/libavocadodb_a-v8-shell.o: V8/v8-shell.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-shell.o -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-shell.Tpo -c -o V8/libavocadodb_a-v8-shell.o `test -f 'V8/v8-shell.cpp' || echo '$(srcdir)/'`V8/v8-shell.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-shell.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-shell.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-shell.cpp' object='V8/libavocadodb_a-v8-shell.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-shell.o `test -f 'V8/v8-shell.cpp' || echo '$(srcdir)/'`V8/v8-shell.cpp - -V8/libavocadodb_a-v8-shell.obj: V8/v8-shell.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-shell.obj -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-shell.Tpo -c -o V8/libavocadodb_a-v8-shell.obj `if test -f 'V8/v8-shell.cpp'; then $(CYGPATH_W) 'V8/v8-shell.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-shell.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-shell.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-shell.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-shell.cpp' object='V8/libavocadodb_a-v8-shell.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-shell.obj `if test -f 'V8/v8-shell.cpp'; then $(CYGPATH_W) 'V8/v8-shell.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-shell.cpp'; fi` - -V8/libavocadodb_a-v8-utils.o: V8/v8-utils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-utils.o -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-utils.Tpo -c -o V8/libavocadodb_a-v8-utils.o `test -f 'V8/v8-utils.cpp' || echo '$(srcdir)/'`V8/v8-utils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-utils.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-utils.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-utils.cpp' object='V8/libavocadodb_a-v8-utils.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-utils.o `test -f 'V8/v8-utils.cpp' || echo '$(srcdir)/'`V8/v8-utils.cpp - -V8/libavocadodb_a-v8-utils.obj: V8/v8-utils.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-utils.obj -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-utils.Tpo -c -o V8/libavocadodb_a-v8-utils.obj `if test -f 'V8/v8-utils.cpp'; then $(CYGPATH_W) 'V8/v8-utils.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-utils.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-utils.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-utils.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-utils.cpp' object='V8/libavocadodb_a-v8-utils.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-utils.obj `if test -f 'V8/v8-utils.cpp'; then $(CYGPATH_W) 'V8/v8-utils.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-utils.cpp'; fi` - -V8/libavocadodb_a-v8-conv.o: V8/v8-conv.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-conv.o -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-conv.Tpo -c -o V8/libavocadodb_a-v8-conv.o `test -f 'V8/v8-conv.cpp' || echo '$(srcdir)/'`V8/v8-conv.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-conv.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-conv.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-conv.cpp' object='V8/libavocadodb_a-v8-conv.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-conv.o `test -f 'V8/v8-conv.cpp' || echo '$(srcdir)/'`V8/v8-conv.cpp - -V8/libavocadodb_a-v8-conv.obj: V8/v8-conv.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-conv.obj -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-conv.Tpo -c -o V8/libavocadodb_a-v8-conv.obj `if test -f 'V8/v8-conv.cpp'; then $(CYGPATH_W) 'V8/v8-conv.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-conv.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-conv.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-conv.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-conv.cpp' object='V8/libavocadodb_a-v8-conv.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-conv.obj `if test -f 'V8/v8-conv.cpp'; then $(CYGPATH_W) 'V8/v8-conv.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-conv.cpp'; fi` - -V8/libavocadodb_a-v8-line-editor.o: V8/v8-line-editor.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-line-editor.o -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-line-editor.Tpo -c -o V8/libavocadodb_a-v8-line-editor.o `test -f 'V8/v8-line-editor.cpp' || echo '$(srcdir)/'`V8/v8-line-editor.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-line-editor.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-line-editor.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-line-editor.cpp' object='V8/libavocadodb_a-v8-line-editor.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-line-editor.o `test -f 'V8/v8-line-editor.cpp' || echo '$(srcdir)/'`V8/v8-line-editor.cpp - -V8/libavocadodb_a-v8-line-editor.obj: V8/v8-line-editor.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-line-editor.obj -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-line-editor.Tpo -c -o V8/libavocadodb_a-v8-line-editor.obj `if test -f 'V8/v8-line-editor.cpp'; then $(CYGPATH_W) 'V8/v8-line-editor.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-line-editor.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-line-editor.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-line-editor.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-line-editor.cpp' object='V8/libavocadodb_a-v8-line-editor.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-line-editor.obj `if test -f 'V8/v8-line-editor.cpp'; then $(CYGPATH_W) 'V8/v8-line-editor.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-line-editor.cpp'; fi` - -V8/libavocadodb_a-v8-vocbase.o: V8/v8-vocbase.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-vocbase.o -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-vocbase.Tpo -c -o V8/libavocadodb_a-v8-vocbase.o `test -f 'V8/v8-vocbase.cpp' || echo '$(srcdir)/'`V8/v8-vocbase.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-vocbase.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-vocbase.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-vocbase.cpp' object='V8/libavocadodb_a-v8-vocbase.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-vocbase.o `test -f 'V8/v8-vocbase.cpp' || echo '$(srcdir)/'`V8/v8-vocbase.cpp - -V8/libavocadodb_a-v8-vocbase.obj: V8/v8-vocbase.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT V8/libavocadodb_a-v8-vocbase.obj -MD -MP -MF V8/$(DEPDIR)/libavocadodb_a-v8-vocbase.Tpo -c -o V8/libavocadodb_a-v8-vocbase.obj `if test -f 'V8/v8-vocbase.cpp'; then $(CYGPATH_W) 'V8/v8-vocbase.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-vocbase.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) V8/$(DEPDIR)/libavocadodb_a-v8-vocbase.Tpo V8/$(DEPDIR)/libavocadodb_a-v8-vocbase.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='V8/v8-vocbase.cpp' object='V8/libavocadodb_a-v8-vocbase.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o V8/libavocadodb_a-v8-vocbase.obj `if test -f 'V8/v8-vocbase.cpp'; then $(CYGPATH_W) 'V8/v8-vocbase.cpp'; else $(CYGPATH_W) '$(srcdir)/V8/v8-vocbase.cpp'; fi` - -Variant/libavocadodb_a-VariantArray.o: Variant/VariantArray.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantArray.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantArray.Tpo -c -o Variant/libavocadodb_a-VariantArray.o `test -f 'Variant/VariantArray.cpp' || echo '$(srcdir)/'`Variant/VariantArray.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantArray.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantArray.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantArray.cpp' object='Variant/libavocadodb_a-VariantArray.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantArray.o `test -f 'Variant/VariantArray.cpp' || echo '$(srcdir)/'`Variant/VariantArray.cpp - -Variant/libavocadodb_a-VariantArray.obj: Variant/VariantArray.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantArray.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantArray.Tpo -c -o Variant/libavocadodb_a-VariantArray.obj `if test -f 'Variant/VariantArray.cpp'; then $(CYGPATH_W) 'Variant/VariantArray.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantArray.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantArray.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantArray.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantArray.cpp' object='Variant/libavocadodb_a-VariantArray.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantArray.obj `if test -f 'Variant/VariantArray.cpp'; then $(CYGPATH_W) 'Variant/VariantArray.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantArray.cpp'; fi` - -Variant/libavocadodb_a-VariantBlob.o: Variant/VariantBlob.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantBlob.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantBlob.Tpo -c -o Variant/libavocadodb_a-VariantBlob.o `test -f 'Variant/VariantBlob.cpp' || echo '$(srcdir)/'`Variant/VariantBlob.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantBlob.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantBlob.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantBlob.cpp' object='Variant/libavocadodb_a-VariantBlob.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantBlob.o `test -f 'Variant/VariantBlob.cpp' || echo '$(srcdir)/'`Variant/VariantBlob.cpp - -Variant/libavocadodb_a-VariantBlob.obj: Variant/VariantBlob.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantBlob.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantBlob.Tpo -c -o Variant/libavocadodb_a-VariantBlob.obj `if test -f 'Variant/VariantBlob.cpp'; then $(CYGPATH_W) 'Variant/VariantBlob.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantBlob.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantBlob.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantBlob.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantBlob.cpp' object='Variant/libavocadodb_a-VariantBlob.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantBlob.obj `if test -f 'Variant/VariantBlob.cpp'; then $(CYGPATH_W) 'Variant/VariantBlob.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantBlob.cpp'; fi` - -Variant/libavocadodb_a-VariantBoolean.o: Variant/VariantBoolean.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantBoolean.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantBoolean.Tpo -c -o Variant/libavocadodb_a-VariantBoolean.o `test -f 'Variant/VariantBoolean.cpp' || echo '$(srcdir)/'`Variant/VariantBoolean.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantBoolean.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantBoolean.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantBoolean.cpp' object='Variant/libavocadodb_a-VariantBoolean.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantBoolean.o `test -f 'Variant/VariantBoolean.cpp' || echo '$(srcdir)/'`Variant/VariantBoolean.cpp - -Variant/libavocadodb_a-VariantBoolean.obj: Variant/VariantBoolean.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantBoolean.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantBoolean.Tpo -c -o Variant/libavocadodb_a-VariantBoolean.obj `if test -f 'Variant/VariantBoolean.cpp'; then $(CYGPATH_W) 'Variant/VariantBoolean.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantBoolean.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantBoolean.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantBoolean.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantBoolean.cpp' object='Variant/libavocadodb_a-VariantBoolean.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantBoolean.obj `if test -f 'Variant/VariantBoolean.cpp'; then $(CYGPATH_W) 'Variant/VariantBoolean.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantBoolean.cpp'; fi` - -Variant/libavocadodb_a-VariantDate.o: Variant/VariantDate.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantDate.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantDate.Tpo -c -o Variant/libavocadodb_a-VariantDate.o `test -f 'Variant/VariantDate.cpp' || echo '$(srcdir)/'`Variant/VariantDate.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantDate.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantDate.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantDate.cpp' object='Variant/libavocadodb_a-VariantDate.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantDate.o `test -f 'Variant/VariantDate.cpp' || echo '$(srcdir)/'`Variant/VariantDate.cpp - -Variant/libavocadodb_a-VariantDate.obj: Variant/VariantDate.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantDate.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantDate.Tpo -c -o Variant/libavocadodb_a-VariantDate.obj `if test -f 'Variant/VariantDate.cpp'; then $(CYGPATH_W) 'Variant/VariantDate.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantDate.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantDate.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantDate.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantDate.cpp' object='Variant/libavocadodb_a-VariantDate.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantDate.obj `if test -f 'Variant/VariantDate.cpp'; then $(CYGPATH_W) 'Variant/VariantDate.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantDate.cpp'; fi` - -Variant/libavocadodb_a-VariantDatetime.o: Variant/VariantDatetime.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantDatetime.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantDatetime.Tpo -c -o Variant/libavocadodb_a-VariantDatetime.o `test -f 'Variant/VariantDatetime.cpp' || echo '$(srcdir)/'`Variant/VariantDatetime.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantDatetime.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantDatetime.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantDatetime.cpp' object='Variant/libavocadodb_a-VariantDatetime.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantDatetime.o `test -f 'Variant/VariantDatetime.cpp' || echo '$(srcdir)/'`Variant/VariantDatetime.cpp - -Variant/libavocadodb_a-VariantDatetime.obj: Variant/VariantDatetime.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantDatetime.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantDatetime.Tpo -c -o Variant/libavocadodb_a-VariantDatetime.obj `if test -f 'Variant/VariantDatetime.cpp'; then $(CYGPATH_W) 'Variant/VariantDatetime.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantDatetime.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantDatetime.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantDatetime.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantDatetime.cpp' object='Variant/libavocadodb_a-VariantDatetime.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantDatetime.obj `if test -f 'Variant/VariantDatetime.cpp'; then $(CYGPATH_W) 'Variant/VariantDatetime.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantDatetime.cpp'; fi` - -Variant/libavocadodb_a-VariantDouble.o: Variant/VariantDouble.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantDouble.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantDouble.Tpo -c -o Variant/libavocadodb_a-VariantDouble.o `test -f 'Variant/VariantDouble.cpp' || echo '$(srcdir)/'`Variant/VariantDouble.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantDouble.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantDouble.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantDouble.cpp' object='Variant/libavocadodb_a-VariantDouble.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantDouble.o `test -f 'Variant/VariantDouble.cpp' || echo '$(srcdir)/'`Variant/VariantDouble.cpp - -Variant/libavocadodb_a-VariantDouble.obj: Variant/VariantDouble.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantDouble.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantDouble.Tpo -c -o Variant/libavocadodb_a-VariantDouble.obj `if test -f 'Variant/VariantDouble.cpp'; then $(CYGPATH_W) 'Variant/VariantDouble.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantDouble.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantDouble.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantDouble.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantDouble.cpp' object='Variant/libavocadodb_a-VariantDouble.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantDouble.obj `if test -f 'Variant/VariantDouble.cpp'; then $(CYGPATH_W) 'Variant/VariantDouble.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantDouble.cpp'; fi` - -Variant/libavocadodb_a-VariantFloat.o: Variant/VariantFloat.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantFloat.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantFloat.Tpo -c -o Variant/libavocadodb_a-VariantFloat.o `test -f 'Variant/VariantFloat.cpp' || echo '$(srcdir)/'`Variant/VariantFloat.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantFloat.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantFloat.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantFloat.cpp' object='Variant/libavocadodb_a-VariantFloat.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantFloat.o `test -f 'Variant/VariantFloat.cpp' || echo '$(srcdir)/'`Variant/VariantFloat.cpp - -Variant/libavocadodb_a-VariantFloat.obj: Variant/VariantFloat.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantFloat.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantFloat.Tpo -c -o Variant/libavocadodb_a-VariantFloat.obj `if test -f 'Variant/VariantFloat.cpp'; then $(CYGPATH_W) 'Variant/VariantFloat.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantFloat.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantFloat.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantFloat.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantFloat.cpp' object='Variant/libavocadodb_a-VariantFloat.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantFloat.obj `if test -f 'Variant/VariantFloat.cpp'; then $(CYGPATH_W) 'Variant/VariantFloat.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantFloat.cpp'; fi` - -Variant/libavocadodb_a-VariantInt16.o: Variant/VariantInt16.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt16.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt16.Tpo -c -o Variant/libavocadodb_a-VariantInt16.o `test -f 'Variant/VariantInt16.cpp' || echo '$(srcdir)/'`Variant/VariantInt16.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt16.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt16.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt16.cpp' object='Variant/libavocadodb_a-VariantInt16.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt16.o `test -f 'Variant/VariantInt16.cpp' || echo '$(srcdir)/'`Variant/VariantInt16.cpp - -Variant/libavocadodb_a-VariantInt16.obj: Variant/VariantInt16.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt16.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt16.Tpo -c -o Variant/libavocadodb_a-VariantInt16.obj `if test -f 'Variant/VariantInt16.cpp'; then $(CYGPATH_W) 'Variant/VariantInt16.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt16.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt16.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt16.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt16.cpp' object='Variant/libavocadodb_a-VariantInt16.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt16.obj `if test -f 'Variant/VariantInt16.cpp'; then $(CYGPATH_W) 'Variant/VariantInt16.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt16.cpp'; fi` - -Variant/libavocadodb_a-VariantInt32.o: Variant/VariantInt32.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt32.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt32.Tpo -c -o Variant/libavocadodb_a-VariantInt32.o `test -f 'Variant/VariantInt32.cpp' || echo '$(srcdir)/'`Variant/VariantInt32.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt32.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt32.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt32.cpp' object='Variant/libavocadodb_a-VariantInt32.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt32.o `test -f 'Variant/VariantInt32.cpp' || echo '$(srcdir)/'`Variant/VariantInt32.cpp - -Variant/libavocadodb_a-VariantInt32.obj: Variant/VariantInt32.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt32.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt32.Tpo -c -o Variant/libavocadodb_a-VariantInt32.obj `if test -f 'Variant/VariantInt32.cpp'; then $(CYGPATH_W) 'Variant/VariantInt32.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt32.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt32.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt32.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt32.cpp' object='Variant/libavocadodb_a-VariantInt32.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt32.obj `if test -f 'Variant/VariantInt32.cpp'; then $(CYGPATH_W) 'Variant/VariantInt32.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt32.cpp'; fi` - -Variant/libavocadodb_a-VariantInt64.o: Variant/VariantInt64.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt64.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt64.Tpo -c -o Variant/libavocadodb_a-VariantInt64.o `test -f 'Variant/VariantInt64.cpp' || echo '$(srcdir)/'`Variant/VariantInt64.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt64.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt64.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt64.cpp' object='Variant/libavocadodb_a-VariantInt64.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt64.o `test -f 'Variant/VariantInt64.cpp' || echo '$(srcdir)/'`Variant/VariantInt64.cpp - -Variant/libavocadodb_a-VariantInt64.obj: Variant/VariantInt64.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt64.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt64.Tpo -c -o Variant/libavocadodb_a-VariantInt64.obj `if test -f 'Variant/VariantInt64.cpp'; then $(CYGPATH_W) 'Variant/VariantInt64.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt64.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt64.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt64.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt64.cpp' object='Variant/libavocadodb_a-VariantInt64.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt64.obj `if test -f 'Variant/VariantInt64.cpp'; then $(CYGPATH_W) 'Variant/VariantInt64.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt64.cpp'; fi` - -Variant/libavocadodb_a-VariantInt8.o: Variant/VariantInt8.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt8.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt8.Tpo -c -o Variant/libavocadodb_a-VariantInt8.o `test -f 'Variant/VariantInt8.cpp' || echo '$(srcdir)/'`Variant/VariantInt8.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt8.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt8.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt8.cpp' object='Variant/libavocadodb_a-VariantInt8.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt8.o `test -f 'Variant/VariantInt8.cpp' || echo '$(srcdir)/'`Variant/VariantInt8.cpp - -Variant/libavocadodb_a-VariantInt8.obj: Variant/VariantInt8.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantInt8.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantInt8.Tpo -c -o Variant/libavocadodb_a-VariantInt8.obj `if test -f 'Variant/VariantInt8.cpp'; then $(CYGPATH_W) 'Variant/VariantInt8.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt8.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantInt8.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantInt8.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantInt8.cpp' object='Variant/libavocadodb_a-VariantInt8.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantInt8.obj `if test -f 'Variant/VariantInt8.cpp'; then $(CYGPATH_W) 'Variant/VariantInt8.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantInt8.cpp'; fi` - -Variant/libavocadodb_a-VariantMatrix2.o: Variant/VariantMatrix2.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantMatrix2.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantMatrix2.Tpo -c -o Variant/libavocadodb_a-VariantMatrix2.o `test -f 'Variant/VariantMatrix2.cpp' || echo '$(srcdir)/'`Variant/VariantMatrix2.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantMatrix2.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantMatrix2.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantMatrix2.cpp' object='Variant/libavocadodb_a-VariantMatrix2.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantMatrix2.o `test -f 'Variant/VariantMatrix2.cpp' || echo '$(srcdir)/'`Variant/VariantMatrix2.cpp - -Variant/libavocadodb_a-VariantMatrix2.obj: Variant/VariantMatrix2.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantMatrix2.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantMatrix2.Tpo -c -o Variant/libavocadodb_a-VariantMatrix2.obj `if test -f 'Variant/VariantMatrix2.cpp'; then $(CYGPATH_W) 'Variant/VariantMatrix2.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantMatrix2.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantMatrix2.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantMatrix2.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantMatrix2.cpp' object='Variant/libavocadodb_a-VariantMatrix2.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantMatrix2.obj `if test -f 'Variant/VariantMatrix2.cpp'; then $(CYGPATH_W) 'Variant/VariantMatrix2.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantMatrix2.cpp'; fi` - -Variant/libavocadodb_a-VariantNull.o: Variant/VariantNull.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantNull.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantNull.Tpo -c -o Variant/libavocadodb_a-VariantNull.o `test -f 'Variant/VariantNull.cpp' || echo '$(srcdir)/'`Variant/VariantNull.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantNull.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantNull.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantNull.cpp' object='Variant/libavocadodb_a-VariantNull.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantNull.o `test -f 'Variant/VariantNull.cpp' || echo '$(srcdir)/'`Variant/VariantNull.cpp - -Variant/libavocadodb_a-VariantNull.obj: Variant/VariantNull.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantNull.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantNull.Tpo -c -o Variant/libavocadodb_a-VariantNull.obj `if test -f 'Variant/VariantNull.cpp'; then $(CYGPATH_W) 'Variant/VariantNull.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantNull.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantNull.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantNull.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantNull.cpp' object='Variant/libavocadodb_a-VariantNull.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantNull.obj `if test -f 'Variant/VariantNull.cpp'; then $(CYGPATH_W) 'Variant/VariantNull.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantNull.cpp'; fi` - -Variant/libavocadodb_a-VariantObject.o: Variant/VariantObject.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantObject.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantObject.Tpo -c -o Variant/libavocadodb_a-VariantObject.o `test -f 'Variant/VariantObject.cpp' || echo '$(srcdir)/'`Variant/VariantObject.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantObject.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantObject.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantObject.cpp' object='Variant/libavocadodb_a-VariantObject.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantObject.o `test -f 'Variant/VariantObject.cpp' || echo '$(srcdir)/'`Variant/VariantObject.cpp - -Variant/libavocadodb_a-VariantObject.obj: Variant/VariantObject.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantObject.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantObject.Tpo -c -o Variant/libavocadodb_a-VariantObject.obj `if test -f 'Variant/VariantObject.cpp'; then $(CYGPATH_W) 'Variant/VariantObject.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantObject.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantObject.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantObject.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantObject.cpp' object='Variant/libavocadodb_a-VariantObject.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantObject.obj `if test -f 'Variant/VariantObject.cpp'; then $(CYGPATH_W) 'Variant/VariantObject.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantObject.cpp'; fi` - -Variant/libavocadodb_a-VariantString.o: Variant/VariantString.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantString.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantString.Tpo -c -o Variant/libavocadodb_a-VariantString.o `test -f 'Variant/VariantString.cpp' || echo '$(srcdir)/'`Variant/VariantString.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantString.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantString.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantString.cpp' object='Variant/libavocadodb_a-VariantString.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantString.o `test -f 'Variant/VariantString.cpp' || echo '$(srcdir)/'`Variant/VariantString.cpp - -Variant/libavocadodb_a-VariantString.obj: Variant/VariantString.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantString.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantString.Tpo -c -o Variant/libavocadodb_a-VariantString.obj `if test -f 'Variant/VariantString.cpp'; then $(CYGPATH_W) 'Variant/VariantString.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantString.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantString.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantString.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantString.cpp' object='Variant/libavocadodb_a-VariantString.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantString.obj `if test -f 'Variant/VariantString.cpp'; then $(CYGPATH_W) 'Variant/VariantString.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantString.cpp'; fi` - -Variant/libavocadodb_a-VariantUInt16.o: Variant/VariantUInt16.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt16.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt16.Tpo -c -o Variant/libavocadodb_a-VariantUInt16.o `test -f 'Variant/VariantUInt16.cpp' || echo '$(srcdir)/'`Variant/VariantUInt16.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt16.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt16.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt16.cpp' object='Variant/libavocadodb_a-VariantUInt16.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt16.o `test -f 'Variant/VariantUInt16.cpp' || echo '$(srcdir)/'`Variant/VariantUInt16.cpp - -Variant/libavocadodb_a-VariantUInt16.obj: Variant/VariantUInt16.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt16.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt16.Tpo -c -o Variant/libavocadodb_a-VariantUInt16.obj `if test -f 'Variant/VariantUInt16.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt16.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt16.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt16.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt16.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt16.cpp' object='Variant/libavocadodb_a-VariantUInt16.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt16.obj `if test -f 'Variant/VariantUInt16.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt16.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt16.cpp'; fi` - -Variant/libavocadodb_a-VariantUInt32.o: Variant/VariantUInt32.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt32.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt32.Tpo -c -o Variant/libavocadodb_a-VariantUInt32.o `test -f 'Variant/VariantUInt32.cpp' || echo '$(srcdir)/'`Variant/VariantUInt32.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt32.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt32.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt32.cpp' object='Variant/libavocadodb_a-VariantUInt32.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt32.o `test -f 'Variant/VariantUInt32.cpp' || echo '$(srcdir)/'`Variant/VariantUInt32.cpp - -Variant/libavocadodb_a-VariantUInt32.obj: Variant/VariantUInt32.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt32.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt32.Tpo -c -o Variant/libavocadodb_a-VariantUInt32.obj `if test -f 'Variant/VariantUInt32.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt32.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt32.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt32.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt32.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt32.cpp' object='Variant/libavocadodb_a-VariantUInt32.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt32.obj `if test -f 'Variant/VariantUInt32.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt32.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt32.cpp'; fi` - -Variant/libavocadodb_a-VariantUInt64.o: Variant/VariantUInt64.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt64.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt64.Tpo -c -o Variant/libavocadodb_a-VariantUInt64.o `test -f 'Variant/VariantUInt64.cpp' || echo '$(srcdir)/'`Variant/VariantUInt64.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt64.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt64.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt64.cpp' object='Variant/libavocadodb_a-VariantUInt64.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt64.o `test -f 'Variant/VariantUInt64.cpp' || echo '$(srcdir)/'`Variant/VariantUInt64.cpp - -Variant/libavocadodb_a-VariantUInt64.obj: Variant/VariantUInt64.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt64.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt64.Tpo -c -o Variant/libavocadodb_a-VariantUInt64.obj `if test -f 'Variant/VariantUInt64.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt64.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt64.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt64.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt64.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt64.cpp' object='Variant/libavocadodb_a-VariantUInt64.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt64.obj `if test -f 'Variant/VariantUInt64.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt64.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt64.cpp'; fi` - -Variant/libavocadodb_a-VariantUInt8.o: Variant/VariantUInt8.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt8.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt8.Tpo -c -o Variant/libavocadodb_a-VariantUInt8.o `test -f 'Variant/VariantUInt8.cpp' || echo '$(srcdir)/'`Variant/VariantUInt8.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt8.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt8.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt8.cpp' object='Variant/libavocadodb_a-VariantUInt8.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt8.o `test -f 'Variant/VariantUInt8.cpp' || echo '$(srcdir)/'`Variant/VariantUInt8.cpp - -Variant/libavocadodb_a-VariantUInt8.obj: Variant/VariantUInt8.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantUInt8.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantUInt8.Tpo -c -o Variant/libavocadodb_a-VariantUInt8.obj `if test -f 'Variant/VariantUInt8.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt8.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt8.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantUInt8.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantUInt8.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantUInt8.cpp' object='Variant/libavocadodb_a-VariantUInt8.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantUInt8.obj `if test -f 'Variant/VariantUInt8.cpp'; then $(CYGPATH_W) 'Variant/VariantUInt8.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantUInt8.cpp'; fi` - -Variant/libavocadodb_a-VariantVector.o: Variant/VariantVector.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantVector.o -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantVector.Tpo -c -o Variant/libavocadodb_a-VariantVector.o `test -f 'Variant/VariantVector.cpp' || echo '$(srcdir)/'`Variant/VariantVector.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantVector.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantVector.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantVector.cpp' object='Variant/libavocadodb_a-VariantVector.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantVector.o `test -f 'Variant/VariantVector.cpp' || echo '$(srcdir)/'`Variant/VariantVector.cpp - -Variant/libavocadodb_a-VariantVector.obj: Variant/VariantVector.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Variant/libavocadodb_a-VariantVector.obj -MD -MP -MF Variant/$(DEPDIR)/libavocadodb_a-VariantVector.Tpo -c -o Variant/libavocadodb_a-VariantVector.obj `if test -f 'Variant/VariantVector.cpp'; then $(CYGPATH_W) 'Variant/VariantVector.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantVector.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Variant/$(DEPDIR)/libavocadodb_a-VariantVector.Tpo Variant/$(DEPDIR)/libavocadodb_a-VariantVector.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Variant/VariantVector.cpp' object='Variant/libavocadodb_a-VariantVector.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Variant/libavocadodb_a-VariantVector.obj `if test -f 'Variant/VariantVector.cpp'; then $(CYGPATH_W) 'Variant/VariantVector.cpp'; else $(CYGPATH_W) '$(srcdir)/Variant/VariantVector.cpp'; fi` - -QL/libavocadodb_a-ParserWrapper.o: QL/ParserWrapper.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QL/libavocadodb_a-ParserWrapper.o -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-ParserWrapper.Tpo -c -o QL/libavocadodb_a-ParserWrapper.o `test -f 'QL/ParserWrapper.cpp' || echo '$(srcdir)/'`QL/ParserWrapper.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-ParserWrapper.Tpo QL/$(DEPDIR)/libavocadodb_a-ParserWrapper.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='QL/ParserWrapper.cpp' object='QL/libavocadodb_a-ParserWrapper.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QL/libavocadodb_a-ParserWrapper.o `test -f 'QL/ParserWrapper.cpp' || echo '$(srcdir)/'`QL/ParserWrapper.cpp - -QL/libavocadodb_a-ParserWrapper.obj: QL/ParserWrapper.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT QL/libavocadodb_a-ParserWrapper.obj -MD -MP -MF QL/$(DEPDIR)/libavocadodb_a-ParserWrapper.Tpo -c -o QL/libavocadodb_a-ParserWrapper.obj `if test -f 'QL/ParserWrapper.cpp'; then $(CYGPATH_W) 'QL/ParserWrapper.cpp'; else $(CYGPATH_W) '$(srcdir)/QL/ParserWrapper.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) QL/$(DEPDIR)/libavocadodb_a-ParserWrapper.Tpo QL/$(DEPDIR)/libavocadodb_a-ParserWrapper.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='QL/ParserWrapper.cpp' object='QL/libavocadodb_a-ParserWrapper.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libavocadodb_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o QL/libavocadodb_a-ParserWrapper.obj `if test -f 'QL/ParserWrapper.cpp'; then $(CYGPATH_W) 'QL/ParserWrapper.cpp'; else $(CYGPATH_W) '$(srcdir)/QL/ParserWrapper.cpp'; fi` - -RestHandler/avocado-RestActionHandler.o: RestHandler/RestActionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestActionHandler.o -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestActionHandler.Tpo -c -o RestHandler/avocado-RestActionHandler.o `test -f 'RestHandler/RestActionHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestActionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestActionHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestActionHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestActionHandler.cpp' object='RestHandler/avocado-RestActionHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestActionHandler.o `test -f 'RestHandler/RestActionHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestActionHandler.cpp - -RestHandler/avocado-RestActionHandler.obj: RestHandler/RestActionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestActionHandler.obj -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestActionHandler.Tpo -c -o RestHandler/avocado-RestActionHandler.obj `if test -f 'RestHandler/RestActionHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestActionHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestActionHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestActionHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestActionHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestActionHandler.cpp' object='RestHandler/avocado-RestActionHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestActionHandler.obj `if test -f 'RestHandler/RestActionHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestActionHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestActionHandler.cpp'; fi` - -RestHandler/avocado-RestDocumentHandler.o: RestHandler/RestDocumentHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestDocumentHandler.o -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestDocumentHandler.Tpo -c -o RestHandler/avocado-RestDocumentHandler.o `test -f 'RestHandler/RestDocumentHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestDocumentHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestDocumentHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestDocumentHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestDocumentHandler.cpp' object='RestHandler/avocado-RestDocumentHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestDocumentHandler.o `test -f 'RestHandler/RestDocumentHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestDocumentHandler.cpp - -RestHandler/avocado-RestDocumentHandler.obj: RestHandler/RestDocumentHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestDocumentHandler.obj -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestDocumentHandler.Tpo -c -o RestHandler/avocado-RestDocumentHandler.obj `if test -f 'RestHandler/RestDocumentHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestDocumentHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestDocumentHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestDocumentHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestDocumentHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestDocumentHandler.cpp' object='RestHandler/avocado-RestDocumentHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestDocumentHandler.obj `if test -f 'RestHandler/RestDocumentHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestDocumentHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestDocumentHandler.cpp'; fi` - -RestHandler/avocado-RestSystemActionHandler.o: RestHandler/RestSystemActionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestSystemActionHandler.o -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestSystemActionHandler.Tpo -c -o RestHandler/avocado-RestSystemActionHandler.o `test -f 'RestHandler/RestSystemActionHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestSystemActionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestSystemActionHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestSystemActionHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestSystemActionHandler.cpp' object='RestHandler/avocado-RestSystemActionHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestSystemActionHandler.o `test -f 'RestHandler/RestSystemActionHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestSystemActionHandler.cpp - -RestHandler/avocado-RestSystemActionHandler.obj: RestHandler/RestSystemActionHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestSystemActionHandler.obj -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestSystemActionHandler.Tpo -c -o RestHandler/avocado-RestSystemActionHandler.obj `if test -f 'RestHandler/RestSystemActionHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestSystemActionHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestSystemActionHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestSystemActionHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestSystemActionHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestSystemActionHandler.cpp' object='RestHandler/avocado-RestSystemActionHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestSystemActionHandler.obj `if test -f 'RestHandler/RestSystemActionHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestSystemActionHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestSystemActionHandler.cpp'; fi` - -RestHandler/avocado-RestVocbaseBaseHandler.o: RestHandler/RestVocbaseBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestVocbaseBaseHandler.o -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestVocbaseBaseHandler.Tpo -c -o RestHandler/avocado-RestVocbaseBaseHandler.o `test -f 'RestHandler/RestVocbaseBaseHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestVocbaseBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestVocbaseBaseHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestVocbaseBaseHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestVocbaseBaseHandler.cpp' object='RestHandler/avocado-RestVocbaseBaseHandler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestVocbaseBaseHandler.o `test -f 'RestHandler/RestVocbaseBaseHandler.cpp' || echo '$(srcdir)/'`RestHandler/RestVocbaseBaseHandler.cpp - -RestHandler/avocado-RestVocbaseBaseHandler.obj: RestHandler/RestVocbaseBaseHandler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestHandler/avocado-RestVocbaseBaseHandler.obj -MD -MP -MF RestHandler/$(DEPDIR)/avocado-RestVocbaseBaseHandler.Tpo -c -o RestHandler/avocado-RestVocbaseBaseHandler.obj `if test -f 'RestHandler/RestVocbaseBaseHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestVocbaseBaseHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestVocbaseBaseHandler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestHandler/$(DEPDIR)/avocado-RestVocbaseBaseHandler.Tpo RestHandler/$(DEPDIR)/avocado-RestVocbaseBaseHandler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestHandler/RestVocbaseBaseHandler.cpp' object='RestHandler/avocado-RestVocbaseBaseHandler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestHandler/avocado-RestVocbaseBaseHandler.obj `if test -f 'RestHandler/RestVocbaseBaseHandler.cpp'; then $(CYGPATH_W) 'RestHandler/RestVocbaseBaseHandler.cpp'; else $(CYGPATH_W) '$(srcdir)/RestHandler/RestVocbaseBaseHandler.cpp'; fi` - -RestServer/avocado-ActionDispatcherThread.o: RestServer/ActionDispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-ActionDispatcherThread.o -MD -MP -MF RestServer/$(DEPDIR)/avocado-ActionDispatcherThread.Tpo -c -o RestServer/avocado-ActionDispatcherThread.o `test -f 'RestServer/ActionDispatcherThread.cpp' || echo '$(srcdir)/'`RestServer/ActionDispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-ActionDispatcherThread.Tpo RestServer/$(DEPDIR)/avocado-ActionDispatcherThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/ActionDispatcherThread.cpp' object='RestServer/avocado-ActionDispatcherThread.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-ActionDispatcherThread.o `test -f 'RestServer/ActionDispatcherThread.cpp' || echo '$(srcdir)/'`RestServer/ActionDispatcherThread.cpp - -RestServer/avocado-ActionDispatcherThread.obj: RestServer/ActionDispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-ActionDispatcherThread.obj -MD -MP -MF RestServer/$(DEPDIR)/avocado-ActionDispatcherThread.Tpo -c -o RestServer/avocado-ActionDispatcherThread.obj `if test -f 'RestServer/ActionDispatcherThread.cpp'; then $(CYGPATH_W) 'RestServer/ActionDispatcherThread.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/ActionDispatcherThread.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-ActionDispatcherThread.Tpo RestServer/$(DEPDIR)/avocado-ActionDispatcherThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/ActionDispatcherThread.cpp' object='RestServer/avocado-ActionDispatcherThread.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-ActionDispatcherThread.obj `if test -f 'RestServer/ActionDispatcherThread.cpp'; then $(CYGPATH_W) 'RestServer/ActionDispatcherThread.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/ActionDispatcherThread.cpp'; fi` - -RestServer/avocado-AvocadoHttpServer.o: RestServer/AvocadoHttpServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-AvocadoHttpServer.o -MD -MP -MF RestServer/$(DEPDIR)/avocado-AvocadoHttpServer.Tpo -c -o RestServer/avocado-AvocadoHttpServer.o `test -f 'RestServer/AvocadoHttpServer.cpp' || echo '$(srcdir)/'`RestServer/AvocadoHttpServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-AvocadoHttpServer.Tpo RestServer/$(DEPDIR)/avocado-AvocadoHttpServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/AvocadoHttpServer.cpp' object='RestServer/avocado-AvocadoHttpServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-AvocadoHttpServer.o `test -f 'RestServer/AvocadoHttpServer.cpp' || echo '$(srcdir)/'`RestServer/AvocadoHttpServer.cpp - -RestServer/avocado-AvocadoHttpServer.obj: RestServer/AvocadoHttpServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-AvocadoHttpServer.obj -MD -MP -MF RestServer/$(DEPDIR)/avocado-AvocadoHttpServer.Tpo -c -o RestServer/avocado-AvocadoHttpServer.obj `if test -f 'RestServer/AvocadoHttpServer.cpp'; then $(CYGPATH_W) 'RestServer/AvocadoHttpServer.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/AvocadoHttpServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-AvocadoHttpServer.Tpo RestServer/$(DEPDIR)/avocado-AvocadoHttpServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/AvocadoHttpServer.cpp' object='RestServer/avocado-AvocadoHttpServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-AvocadoHttpServer.obj `if test -f 'RestServer/AvocadoHttpServer.cpp'; then $(CYGPATH_W) 'RestServer/AvocadoHttpServer.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/AvocadoHttpServer.cpp'; fi` - -RestServer/avocado-AvocadoServer.o: RestServer/AvocadoServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-AvocadoServer.o -MD -MP -MF RestServer/$(DEPDIR)/avocado-AvocadoServer.Tpo -c -o RestServer/avocado-AvocadoServer.o `test -f 'RestServer/AvocadoServer.cpp' || echo '$(srcdir)/'`RestServer/AvocadoServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-AvocadoServer.Tpo RestServer/$(DEPDIR)/avocado-AvocadoServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/AvocadoServer.cpp' object='RestServer/avocado-AvocadoServer.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-AvocadoServer.o `test -f 'RestServer/AvocadoServer.cpp' || echo '$(srcdir)/'`RestServer/AvocadoServer.cpp - -RestServer/avocado-AvocadoServer.obj: RestServer/AvocadoServer.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-AvocadoServer.obj -MD -MP -MF RestServer/$(DEPDIR)/avocado-AvocadoServer.Tpo -c -o RestServer/avocado-AvocadoServer.obj `if test -f 'RestServer/AvocadoServer.cpp'; then $(CYGPATH_W) 'RestServer/AvocadoServer.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/AvocadoServer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-AvocadoServer.Tpo RestServer/$(DEPDIR)/avocado-AvocadoServer.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/AvocadoServer.cpp' object='RestServer/avocado-AvocadoServer.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-AvocadoServer.obj `if test -f 'RestServer/AvocadoServer.cpp'; then $(CYGPATH_W) 'RestServer/AvocadoServer.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/AvocadoServer.cpp'; fi` - -RestServer/avocado-JSLoader.o: RestServer/JSLoader.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-JSLoader.o -MD -MP -MF RestServer/$(DEPDIR)/avocado-JSLoader.Tpo -c -o RestServer/avocado-JSLoader.o `test -f 'RestServer/JSLoader.cpp' || echo '$(srcdir)/'`RestServer/JSLoader.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-JSLoader.Tpo RestServer/$(DEPDIR)/avocado-JSLoader.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/JSLoader.cpp' object='RestServer/avocado-JSLoader.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-JSLoader.o `test -f 'RestServer/JSLoader.cpp' || echo '$(srcdir)/'`RestServer/JSLoader.cpp - -RestServer/avocado-JSLoader.obj: RestServer/JSLoader.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-JSLoader.obj -MD -MP -MF RestServer/$(DEPDIR)/avocado-JSLoader.Tpo -c -o RestServer/avocado-JSLoader.obj `if test -f 'RestServer/JSLoader.cpp'; then $(CYGPATH_W) 'RestServer/JSLoader.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/JSLoader.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-JSLoader.Tpo RestServer/$(DEPDIR)/avocado-JSLoader.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/JSLoader.cpp' object='RestServer/avocado-JSLoader.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-JSLoader.obj `if test -f 'RestServer/JSLoader.cpp'; then $(CYGPATH_W) 'RestServer/JSLoader.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/JSLoader.cpp'; fi` - -RestServer/avocado-SystemActionDispatcherThread.o: RestServer/SystemActionDispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-SystemActionDispatcherThread.o -MD -MP -MF RestServer/$(DEPDIR)/avocado-SystemActionDispatcherThread.Tpo -c -o RestServer/avocado-SystemActionDispatcherThread.o `test -f 'RestServer/SystemActionDispatcherThread.cpp' || echo '$(srcdir)/'`RestServer/SystemActionDispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-SystemActionDispatcherThread.Tpo RestServer/$(DEPDIR)/avocado-SystemActionDispatcherThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/SystemActionDispatcherThread.cpp' object='RestServer/avocado-SystemActionDispatcherThread.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-SystemActionDispatcherThread.o `test -f 'RestServer/SystemActionDispatcherThread.cpp' || echo '$(srcdir)/'`RestServer/SystemActionDispatcherThread.cpp - -RestServer/avocado-SystemActionDispatcherThread.obj: RestServer/SystemActionDispatcherThread.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-SystemActionDispatcherThread.obj -MD -MP -MF RestServer/$(DEPDIR)/avocado-SystemActionDispatcherThread.Tpo -c -o RestServer/avocado-SystemActionDispatcherThread.obj `if test -f 'RestServer/SystemActionDispatcherThread.cpp'; then $(CYGPATH_W) 'RestServer/SystemActionDispatcherThread.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/SystemActionDispatcherThread.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-SystemActionDispatcherThread.Tpo RestServer/$(DEPDIR)/avocado-SystemActionDispatcherThread.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/SystemActionDispatcherThread.cpp' object='RestServer/avocado-SystemActionDispatcherThread.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-SystemActionDispatcherThread.obj `if test -f 'RestServer/SystemActionDispatcherThread.cpp'; then $(CYGPATH_W) 'RestServer/SystemActionDispatcherThread.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/SystemActionDispatcherThread.cpp'; fi` - -RestServer/avocado-avocado.o: RestServer/avocado.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-avocado.o -MD -MP -MF RestServer/$(DEPDIR)/avocado-avocado.Tpo -c -o RestServer/avocado-avocado.o `test -f 'RestServer/avocado.cpp' || echo '$(srcdir)/'`RestServer/avocado.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-avocado.Tpo RestServer/$(DEPDIR)/avocado-avocado.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/avocado.cpp' object='RestServer/avocado-avocado.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-avocado.o `test -f 'RestServer/avocado.cpp' || echo '$(srcdir)/'`RestServer/avocado.cpp - -RestServer/avocado-avocado.obj: RestServer/avocado.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RestServer/avocado-avocado.obj -MD -MP -MF RestServer/$(DEPDIR)/avocado-avocado.Tpo -c -o RestServer/avocado-avocado.obj `if test -f 'RestServer/avocado.cpp'; then $(CYGPATH_W) 'RestServer/avocado.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/avocado.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) RestServer/$(DEPDIR)/avocado-avocado.Tpo RestServer/$(DEPDIR)/avocado-avocado.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='RestServer/avocado.cpp' object='RestServer/avocado-avocado.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(avocado_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RestServer/avocado-avocado.obj `if test -f 'RestServer/avocado.cpp'; then $(CYGPATH_W) 'RestServer/avocado.cpp'; else $(CYGPATH_W) '$(srcdir)/RestServer/avocado.cpp'; fi` install-nobase_pkgdataDATA: $(nobase_pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @@ -4994,9 +2057,9 @@ distcleancheck: distclean check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(DATA) +all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"; do \ + for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -5035,6 +2098,8 @@ distclean-generic: -rm -f GeneralServer/$(am__dirstamp) -rm -f GeoIndex/$(DEPDIR)/$(am__dirstamp) -rm -f GeoIndex/$(am__dirstamp) + -rm -f HashIndex/$(DEPDIR)/$(am__dirstamp) + -rm -f HashIndex/$(am__dirstamp) -rm -f HttpServer/$(DEPDIR)/$(am__dirstamp) -rm -f HttpServer/$(am__dirstamp) -rm -f HttpsServer/$(DEPDIR)/$(am__dirstamp) @@ -5061,6 +2126,8 @@ distclean-generic: -rm -f Scheduler/$(am__dirstamp) -rm -f ShapedJson/$(DEPDIR)/$(am__dirstamp) -rm -f ShapedJson/$(am__dirstamp) + -rm -f SkipLists/$(DEPDIR)/$(am__dirstamp) + -rm -f SkipLists/$(am__dirstamp) -rm -f V8/$(DEPDIR)/$(am__dirstamp) -rm -f V8/$(am__dirstamp) -rm -f Variant/$(DEPDIR)/$(am__dirstamp) @@ -5072,14 +2139,14 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +@ENABLE_INSTALL_DBDIR_FALSE@install-data-local: clean: clean-am -clean-am: clean-binPROGRAMS clean-generic clean-local \ - clean-noinstLIBRARIES mostlyclean-am +clean-am: clean-generic clean-local clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf Admin/$(DEPDIR) ApplicationServer/$(DEPDIR) Basics/$(DEPDIR) BasicsC/$(DEPDIR) Dispatcher/$(DEPDIR) GeneralServer/$(DEPDIR) GeoIndex/$(DEPDIR) HttpServer/$(DEPDIR) HttpsServer/$(DEPDIR) JsonParser/$(DEPDIR) JsonParserX/$(DEPDIR) Logger/$(DEPDIR) ProgramOptions/$(DEPDIR) QL/$(DEPDIR) Rest/$(DEPDIR) RestHandler/$(DEPDIR) RestServer/$(DEPDIR) ResultGenerator/$(DEPDIR) Scheduler/$(DEPDIR) ShapedJson/$(DEPDIR) V8/$(DEPDIR) Variant/$(DEPDIR) VocBase/$(DEPDIR) + -rm -rf Admin/$(DEPDIR) ApplicationServer/$(DEPDIR) Basics/$(DEPDIR) BasicsC/$(DEPDIR) Dispatcher/$(DEPDIR) GeneralServer/$(DEPDIR) GeoIndex/$(DEPDIR) HashIndex/$(DEPDIR) HttpServer/$(DEPDIR) HttpsServer/$(DEPDIR) JsonParser/$(DEPDIR) JsonParserX/$(DEPDIR) Logger/$(DEPDIR) ProgramOptions/$(DEPDIR) QL/$(DEPDIR) Rest/$(DEPDIR) RestHandler/$(DEPDIR) RestServer/$(DEPDIR) ResultGenerator/$(DEPDIR) Scheduler/$(DEPDIR) ShapedJson/$(DEPDIR) SkipLists/$(DEPDIR) V8/$(DEPDIR) Variant/$(DEPDIR) VocBase/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags @@ -5102,7 +2169,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-binPROGRAMS +install-exec-am: install-sbinPROGRAMS install-html: install-html-am @@ -5127,7 +2194,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf Admin/$(DEPDIR) ApplicationServer/$(DEPDIR) Basics/$(DEPDIR) BasicsC/$(DEPDIR) Dispatcher/$(DEPDIR) GeneralServer/$(DEPDIR) GeoIndex/$(DEPDIR) HttpServer/$(DEPDIR) HttpsServer/$(DEPDIR) JsonParser/$(DEPDIR) JsonParserX/$(DEPDIR) Logger/$(DEPDIR) ProgramOptions/$(DEPDIR) QL/$(DEPDIR) Rest/$(DEPDIR) RestHandler/$(DEPDIR) RestServer/$(DEPDIR) ResultGenerator/$(DEPDIR) Scheduler/$(DEPDIR) ShapedJson/$(DEPDIR) V8/$(DEPDIR) Variant/$(DEPDIR) VocBase/$(DEPDIR) + -rm -rf Admin/$(DEPDIR) ApplicationServer/$(DEPDIR) Basics/$(DEPDIR) BasicsC/$(DEPDIR) Dispatcher/$(DEPDIR) GeneralServer/$(DEPDIR) GeoIndex/$(DEPDIR) HashIndex/$(DEPDIR) HttpServer/$(DEPDIR) HttpsServer/$(DEPDIR) JsonParser/$(DEPDIR) JsonParserX/$(DEPDIR) Logger/$(DEPDIR) ProgramOptions/$(DEPDIR) QL/$(DEPDIR) Rest/$(DEPDIR) RestHandler/$(DEPDIR) RestServer/$(DEPDIR) ResultGenerator/$(DEPDIR) Scheduler/$(DEPDIR) ShapedJson/$(DEPDIR) SkipLists/$(DEPDIR) V8/$(DEPDIR) Variant/$(DEPDIR) VocBase/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -5143,31 +2210,31 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-nobase_pkgdataDATA +uninstall-am: uninstall-nobase_pkgdataDATA uninstall-sbinPROGRAMS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ - clean-binPROGRAMS clean-generic clean-local \ - clean-noinstLIBRARIES ctags dist dist-all dist-bzip2 dist-gzip \ - dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ + clean-generic clean-local clean-sbinPROGRAMS ctags dist \ + dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nobase_pkgdataDATA \ install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-nobase_pkgdataDATA + install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-nobase_pkgdataDATA \ + uninstall-sbinPROGRAMS -install-data-local: - test -d @localstatedir@//${PACKAGE_TARNAME} || mkdir -p @localstatedir@//${PACKAGE_TARNAME} +@ENABLE_INSTALL_DBDIR_TRUE@install-data-local: +@ENABLE_INSTALL_DBDIR_TRUE@ test -d @localstatedir@/${PACKAGE_TARNAME} || mkdir -p @localstatedir@/${PACKAGE_TARNAME} .PHONY: Doxygen/js Doxygen/js/system Doxygen/js/modules @@ -5200,7 +2267,7 @@ Doxygen/xml/%.md: Doxygen/xml/%.xml .PHONY: doxygen doxygen: Doxygen/avocado.doxy $(DOXYGEN) - doxygen Doxygen/avocado.doxy + doxygen Doxygen/avocado.doxy > /dev/null ################################################################################ ################################################################################ @@ -5251,15 +2318,20 @@ js/server/js-%.h: @srcdir@/js/server/%.js .setup-directories @ENABLE_BISON_TRUE@JsonParserX/%.cpp: @srcdir@/JsonParserX/%.yy @ENABLE_BISON_TRUE@ @top_srcdir@/config/bison-c++.sh $(BISON) $@ $< -@ENABLE_ALL_IN_ONE_TRUE@@LIBEV_LIBS@: +@ENABLE_ALL_IN_ONE_TRUE@@LIBEV_LIBS@: .libev-build + +@ENABLE_ALL_IN_ONE_TRUE@.libev-build: @ENABLE_ALL_IN_ONE_TRUE@ @echo @ENABLE_ALL_IN_ONE_TRUE@ @echo "--------------------------------------------------------------------------------" @ENABLE_ALL_IN_ONE_TRUE@ @echo "BUILDING LIBEV" @ENABLE_ALL_IN_ONE_TRUE@ @echo "--------------------------------------------------------------------------------" @ENABLE_ALL_IN_ONE_TRUE@ @echo -@ENABLE_ALL_IN_ONE_TRUE@ cd @top_srcdir@/3rdParty/libev && ./configure --disable-shared -@ENABLE_ALL_IN_ONE_TRUE@ cd @top_srcdir@/3rdParty/libev && make +@ENABLE_ALL_IN_ONE_TRUE@ mkdir @top_srcdir@/3rdParty/libev/$(LIBEV_BUILD_VERSION) || true +@ENABLE_ALL_IN_ONE_TRUE@ cd @top_srcdir@/3rdParty/libev/$(LIBEV_BUILD_VERSION) && CFLAGS="$(LIBEV_CFLAGS_32)" orig_CFLAGS="$(LIBEV_CFLAGS_32)" LDFLAGS="$(LIBEV_LDFLAGS_32)" ../configure --disable-shared +@ENABLE_ALL_IN_ONE_TRUE@ cd @top_srcdir@/3rdParty/libev/$(LIBEV_BUILD_VERSION) && make + +@ENABLE_ALL_IN_ONE_TRUE@ touch .libev-build @ENABLE_ALL_IN_ONE_TRUE@ @echo @ENABLE_ALL_IN_ONE_TRUE@ @echo "--------------------------------------------------------------------------------" @@ -5267,7 +2339,9 @@ js/server/js-%.h: @srcdir@/js/server/%.js .setup-directories @ENABLE_ALL_IN_ONE_TRUE@ @echo "--------------------------------------------------------------------------------" @ENABLE_ALL_IN_ONE_TRUE@ @echo -@ENABLE_ALL_IN_ONE_TRUE@$(V8_LIBS): +@ENABLE_ALL_IN_ONE_TRUE@@V8_LIBS@: .v8-build + +@ENABLE_ALL_IN_ONE_TRUE@.v8-build: @ENABLE_ALL_IN_ONE_TRUE@ @echo @ENABLE_ALL_IN_ONE_TRUE@ @echo "--------------------------------------------------------------------------------" @ENABLE_ALL_IN_ONE_TRUE@ @echo "BUILDING V8" @@ -5275,8 +2349,11 @@ js/server/js-%.h: @srcdir@/js/server/%.js .setup-directories @ENABLE_ALL_IN_ONE_TRUE@ @echo @ENABLE_ALL_IN_ONE_TRUE@@ENABLE_DARWIN_TRUE@ cd @top_srcdir@/3rdParty/V8 && scons snapshot=off library=static mode=release arch=$(V8_BUILD_VERSION) +@ENABLE_ALL_IN_ONE_TRUE@@ENABLE_DARWIN_TRUE@ cd @top_srcdir@/3rdParty/V8 && mv libv8.a libv8_$(V8_BUILD_VERSION).a @ENABLE_ALL_IN_ONE_TRUE@@ENABLE_DARWIN_FALSE@ cd @top_srcdir@/3rdParty/V8 && make library=static snapshot=off $(V8_BUILD_VERSION).release +@ENABLE_ALL_IN_ONE_TRUE@ touch .v8-build + @ENABLE_ALL_IN_ONE_TRUE@ @echo @ENABLE_ALL_IN_ONE_TRUE@ @echo "--------------------------------------------------------------------------------" @ENABLE_ALL_IN_ONE_TRUE@ @echo "BUILD V8 FINISHED" diff --git a/ProgramOptions/program-options.c b/ProgramOptions/program-options.c index 8cea52c079..7c796c67ba 100644 --- a/ProgramOptions/program-options.c +++ b/ProgramOptions/program-options.c @@ -1348,9 +1348,7 @@ bool TRI_ParseArgumentsProgramOptions (TRI_program_options_t * options, int argc, char ** argv) { extern char *optarg; - extern int opterr; extern int optind; - extern int optopt; TRI_string_buffer_t buffer; TRI_PO_item_t * item; diff --git a/QL/ParserWrapper.cpp b/QL/ParserWrapper.cpp deleted file mode 100644 index e5703d218f..0000000000 --- a/QL/ParserWrapper.cpp +++ /dev/null @@ -1,416 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief QL parser wrapper and utility classes -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Jan Steemann -/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#include "ParserWrapper.h" - -using namespace std; -using namespace triagens::avocado; - - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - - -// ----------------------------------------------------------------------------- -// --SECTION-- class ParseError -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create a new parse error instance -//////////////////////////////////////////////////////////////////////////////// - -ParseError::ParseError (const string& message, const size_t line, const size_t column) : - _message(message), _line(line), _column(column) { -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Destroy the instance -//////////////////////////////////////////////////////////////////////////////// - -ParseError::~ParseError () { -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the parse error as a formatted string -//////////////////////////////////////////////////////////////////////////////// - -string ParseError::getDescription () const { - ostringstream errorMessage; - errorMessage << "Parse error at " << _line << "," << _column << ": " << _message; - - return errorMessage.str(); -} - -// ----------------------------------------------------------------------------- -// --SECTION-- class ParserWrapper -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create a new instance -//////////////////////////////////////////////////////////////////////////////// - -ParserWrapper::ParserWrapper (const char *query) : - _query(query), _parseError(0), _isParsed(false) { - _context = (QL_parser_context_t*) TRI_Allocate(sizeof(QL_parser_context_t)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Destroy the instance and free all associated memory -//////////////////////////////////////////////////////////////////////////////// - -ParserWrapper::~ParserWrapper () { - if (_context != 0) { - QLParseFree(_context); - } - if (_parseError) { - delete _parseError; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Parse the query passed -//////////////////////////////////////////////////////////////////////////////// - -bool ParserWrapper::parse () { - if (_context == 0) { - return false; - } - - if (_query == 0) { - return false; - } - - if (_isParsed) { - return false; - } - - _isParsed = true; - - if (!QLParseInit(_context, _query)) { - return false; - } - - if (QLparse(_context)) { - // parse error - QL_error_state_t *errorState = &_context->_lexState._errorState; - _parseError= new ParseError(errorState->_message, errorState->_line, errorState->_column); - return false; - } - - if (!QLParseValidate(_context, _context->_query->_select._base)) { - QL_error_state_t *errorState = &_context->_lexState._errorState; - _parseError= new ParseError(errorState->_message, errorState->_line, errorState->_column); - return false; - } - - if (!QLParseValidate(_context, _context->_query->_where._base)) { - QL_error_state_t *errorState = &_context->_lexState._errorState; - _parseError= new ParseError(errorState->_message, errorState->_line, errorState->_column); - return false; - } - - return true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get a parse error that may have occurred -//////////////////////////////////////////////////////////////////////////////// - -ParseError* ParserWrapper::getParseError () { - return _parseError; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the type of the query -//////////////////////////////////////////////////////////////////////////////// - -QL_ast_query_type_e ParserWrapper::getQueryType () { - if (!_isParsed) { - return QLQueryTypeUndefined; - } - - return _context->_query->_type; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create a select clause -//////////////////////////////////////////////////////////////////////////////// - -TRI_qry_select_t* ParserWrapper::getSelect () { - TRI_qry_select_t* select = 0; - - if (!_isParsed) { - return 0; - } - - QLOptimizeExpression(_context->_query->_select._base); - QL_ast_query_select_type_e selectType = QLOptimizeGetSelectType(_context->_query); - - if (selectType == QLQuerySelectTypeSimple) { - select = TRI_CreateQuerySelectDocument(); - } - else if (selectType == QLQuerySelectTypeEvaluated) { - QL_javascript_conversion_t *selectJs = QLJavascripterInit(); - if (selectJs != 0) { - TRI_AppendStringStringBuffer(selectJs->_buffer, "(function($) { return "); - QLJavascripterConvert(selectJs, _context->_query->_select._base); - TRI_AppendStringStringBuffer(selectJs->_buffer, " })"); - select = TRI_CreateQuerySelectGeneral(selectJs->_buffer->_buffer); - // TODO: REMOVE ME - // std::cout << "SELECT: " << selectJs->_buffer->_buffer << "\n"; - QLJavascripterFree(selectJs); - } - } - - return select; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the alias of the primary collection -//////////////////////////////////////////////////////////////////////////////// - -char* ParserWrapper::getPrimaryAlias () { - if (_isParsed) { - return QLAstQueryGetPrimaryAlias(_context->_query); - } - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the name of the primary collection -//////////////////////////////////////////////////////////////////////////////// - -char* ParserWrapper::getPrimaryName () { - if (_isParsed) { - return QLAstQueryGetPrimaryName(_context->_query); - } - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create joins -//////////////////////////////////////////////////////////////////////////////// - -TRI_select_join_t* ParserWrapper::getJoins () { - TRI_select_join_t* join = 0; - char *collectionName; - char *collectionAlias; - - if (!_isParsed ) { - return NULL; - } - - join = TRI_CreateSelectJoin(); - if (!join) { - return NULL; - } - - QL_ast_node_t *node = (QL_ast_node_t *) _context->_query->_from._base; - node = (QL_ast_node_t *) node->_next; - //QL_formatter_t f; - //f.indentLevel = 0; - //QLFormatterDump(_context->_query->_from._base, &f, 0); - - assert(node != 0); - - // primary table - QL_ast_node_t *lhs = (QL_ast_node_t *) node->_lhs; - QL_ast_node_t *rhs = (QL_ast_node_t *) node->_rhs; - collectionName = lhs->_value._stringValue; - collectionAlias = rhs->_value._stringValue; - - TRI_AddPartSelectJoin(join, JOIN_TYPE_PRIMARY, NULL, collectionName, collectionAlias); - - while (node->_next) { - node = (QL_ast_node_t *) node->_next; - QL_ast_node_t *ref = (QL_ast_node_t *) node->_lhs; - QL_ast_node_t *condition = (QL_ast_node_t *) node->_rhs; - - QLOptimizeExpression(condition); - QL_ast_query_where_type_e conditionType = QLOptimizeGetWhereType(condition); - - TRI_qry_where_t* joinWhere = 0; - - if (conditionType == QLQueryWhereTypeAlwaysTrue) { - // join condition is always true - joinWhere = TRI_CreateQueryWhereBoolean(true); - } - else if (conditionType == QLQueryWhereTypeAlwaysFalse) { - // join condition is always false - joinWhere = TRI_CreateQueryWhereBoolean(false); - } - else { - // where condition must be evaluated for each result - QL_javascript_conversion_t *conditionJs = QLJavascripterInit(); - if (conditionJs != 0) { - TRI_AppendStringStringBuffer(conditionJs->_buffer, "(function($) { return ("); - QLJavascripterConvert(conditionJs, condition); - TRI_AppendStringStringBuffer(conditionJs->_buffer, "); })"); - joinWhere = TRI_CreateQueryWhereGeneral(conditionJs->_buffer->_buffer); - QLJavascripterFree(conditionJs); - } - } - - collectionName = ((QL_ast_node_t *) (ref->_lhs))->_value._stringValue; - collectionAlias = ((QL_ast_node_t *) (ref->_rhs))->_value._stringValue; - - if (node->_type == QLNodeJoinList) { - TRI_AddPartSelectJoin(join, JOIN_TYPE_LIST, joinWhere, collectionName, collectionAlias); - } - else if (node->_type == QLNodeJoinInner) { - TRI_AddPartSelectJoin(join, JOIN_TYPE_INNER, joinWhere, collectionName, collectionAlias); - } - else if (node->_type == QLNodeJoinLeft || node->_type == QLNodeJoinRight) { - TRI_AddPartSelectJoin(join, JOIN_TYPE_OUTER, joinWhere, collectionName, collectionAlias); - } - } - - return join; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create a where clause -//////////////////////////////////////////////////////////////////////////////// - -TRI_qry_where_t* ParserWrapper::getWhere () { - TRI_qry_where_t* where = 0; - - if (!_isParsed) { - return NULL; - } - - QLOptimizeExpression(_context->_query->_where._base); - // TODO: REMOVE ME - // QL_formatter_t f; - // f.indentLevel = 0; - // QLFormatterDump(_context->_query->_where._base, &f, 0); - - _context->_query->_where._type = QLOptimizeGetWhereType(_context->_query->_where._base); - - if (_context->_query->_where._type == QLQueryWhereTypeAlwaysTrue) { - // where condition is always true - where = TRI_CreateQueryWhereBoolean(true); - } - else if (_context->_query->_where._type == QLQueryWhereTypeAlwaysFalse) { - // where condition is always false - where = TRI_CreateQueryWhereBoolean(false); - } - else { - // where condition must be evaluated for each result - QL_javascript_conversion_t *whereJs = QLJavascripterInit(); - if (whereJs != 0) { - TRI_AppendStringStringBuffer(whereJs->_buffer, "(function($) { return ("); - QLJavascripterConvert(whereJs, _context->_query->_where._base); - TRI_AppendStringStringBuffer(whereJs->_buffer, "); })"); - where = TRI_CreateQueryWhereGeneral(whereJs->_buffer->_buffer); - // TODO: REMOVE ME - // std::cout << "WHERE: " << whereJs->_buffer->_buffer << "\n"; - QLJavascripterFree(whereJs); - } - } - - return where; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create an order clause -//////////////////////////////////////////////////////////////////////////////// - -TRI_qry_order_t* ParserWrapper::getOrder () { - TRI_qry_order_t* order = 0; - - if (!_isParsed ) { - return NULL; - } - - if (_context->_query->_order._base) { - QLOptimizeOrder(_context->_query->_order._base); - QL_javascript_conversion_t *orderJs = QLJavascripterInit(); - if (orderJs != 0) { - TRI_AppendStringStringBuffer(orderJs->_buffer, "(function($){var lhs,rhs;"); - QLJavascripterConvertOrder(orderJs, (QL_ast_node_t *) _context->_query->_order._base->_next); - TRI_AppendStringStringBuffer(orderJs->_buffer, "})"); - order = TRI_CreateQueryOrderGeneral(orderJs->_buffer->_buffer); - // TODO: REMOVE ME - // std::cout << "ORDER: " << orderJs->_buffer->_buffer << "\n"; - QLJavascripterFree(orderJs); - } - } - - return order; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the skip value -//////////////////////////////////////////////////////////////////////////////// - -TRI_voc_size_t ParserWrapper::getSkip () { - TRI_voc_size_t skip = 0; - - if (_isParsed) { - if (_context->_query->_limit._isUsed) { - skip = (TRI_voc_size_t) _context->_query->_limit._offset; - } - else { - skip = TRI_QRY_NO_SKIP; - } - } - - return skip; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the limit value -//////////////////////////////////////////////////////////////////////////////// - -TRI_voc_ssize_t ParserWrapper::getLimit () { - TRI_voc_ssize_t limit = 0; - - if (_isParsed) { - if (_context->_query->_limit._isUsed) { - limit = (TRI_voc_ssize_t) _context->_query->_limit._count; - } - else { - limit = TRI_QRY_NO_LIMIT; - } - } - - return limit; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: diff --git a/QL/ParserWrapper.h b/QL/ParserWrapper.h deleted file mode 100644 index 43e94edcc5..0000000000 --- a/QL/ParserWrapper.h +++ /dev/null @@ -1,247 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief QL parser wrapper and utility classes -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Jan Steemann -/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#ifndef TRIAGENS_QL_PARSERWRAPPER_H -#define TRIAGENS_QL_PARSERWRAPPER 1 - -#include "Basics/Common.h" - -#include -#include -#include - -#include "QL/ast-node.h" -#include "QL/ast-query.h" -#include "QL/parser-context.h" -#include "QL/optimize.h" -#include "QL/formatter.h" -#include "QL/javascripter.h" - -#include "VocBase/query.h" -#include "VocBase/join.h" - -using namespace std; - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -namespace triagens { - namespace avocado { - -// ----------------------------------------------------------------------------- -// --SECTION-- class ParseError -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Parse error container -//////////////////////////////////////////////////////////////////////////////// - - class ParseError { - public: - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Destroy the instance -//////////////////////////////////////////////////////////////////////////////// - - ParseError(const string&, const size_t, const size_t); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Destroy the instance -//////////////////////////////////////////////////////////////////////////////// - - ~ParseError(); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the parse error as a formatted string -//////////////////////////////////////////////////////////////////////////////// - - string getDescription() const; - - private: - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Parse error as created by Bison -//////////////////////////////////////////////////////////////////////////////// - - string _message; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Line in which the error occurred -//////////////////////////////////////////////////////////////////////////////// - - size_t _line; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Column in which the error occurred -//////////////////////////////////////////////////////////////////////////////// - - size_t _column; - }; - - -// ----------------------------------------------------------------------------- -// --SECTION-- class ParserWrapper -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Parser wrapper -/// -/// This is a simple wrapper around the C level parser functions. The wrapper -/// cares about memory allocation and deallocation and provides access to the -/// parse results -//////////////////////////////////////////////////////////////////////////////// - - class ParserWrapper { - public: - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create a new instance -//////////////////////////////////////////////////////////////////////////////// - - ParserWrapper (const char*); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Destroy the instance and free all associated memory -//////////////////////////////////////////////////////////////////////////////// - - ~ParserWrapper (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Parse the query passed -//////////////////////////////////////////////////////////////////////////////// - - bool parse (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get a parse error that may have occurred -//////////////////////////////////////////////////////////////////////////////// - - ParseError* getParseError (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the type of the query -//////////////////////////////////////////////////////////////////////////////// - - QL_ast_query_type_e getQueryType (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create a select clause -//////////////////////////////////////////////////////////////////////////////// - - TRI_qry_select_t* getSelect (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the alias of the primary collection -//////////////////////////////////////////////////////////////////////////////// - - char* getPrimaryAlias (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the name of the primary collection -//////////////////////////////////////////////////////////////////////////////// - - char* getPrimaryName (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create joins -//////////////////////////////////////////////////////////////////////////////// - - TRI_select_join_t* getJoins (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create a where clause -//////////////////////////////////////////////////////////////////////////////// - - TRI_qry_where_t* getWhere (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Create an order clause -//////////////////////////////////////////////////////////////////////////////// - - TRI_qry_order_t* getOrder (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the skip value -//////////////////////////////////////////////////////////////////////////////// - - TRI_voc_size_t getSkip (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Get the limit value -//////////////////////////////////////////////////////////////////////////////// - - TRI_voc_ssize_t getLimit (); - - private: - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Query string -//////////////////////////////////////////////////////////////////////////////// - - const char* _query; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Parser context. This is a struct that is used extensively by the -/// parser. It contains a pointer to the flex lexer, a pointer to the query's -/// AST root nodes and state information for memory management (GC) -//////////////////////////////////////////////////////////////////////////////// - - QL_parser_context_t* _context; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Pointer to a parse error -/// -/// The parse error object is automatically created during parsing if a parse -/// error occurs. It will be freed automatically when the parser is destroyed. -//////////////////////////////////////////////////////////////////////////////// - - ParseError* _parseError; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Flag if parsing has already taken place -/// -/// Using this flag duplicate parsing and all of its issues can be avoided -//////////////////////////////////////////////////////////////////////////////// - - bool _isParsed; - }; - - } -} - -/////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -#endif - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: diff --git a/QL/ast-node.c b/QL/ast-node.c deleted file mode 100644 index 04498bfa53..0000000000 --- a/QL/ast-node.c +++ /dev/null @@ -1,427 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief AST node declarations -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Jan Steemann -/// @author Copyright 2012, triagens GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#include "QL/ast-node.h" - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get text/label for a node based on its type -//////////////////////////////////////////////////////////////////////////////// - -const char* QLAstNodeGetName (const QL_ast_node_type_e type) { - switch (type) { - case QLNodeContainerList: - return "list container"; - case QLNodeContainerOrderElement: - return "order element container"; - case QLNodeContainerMemberAccess: - return "member access"; - case QLNodeContainerTernarySwitch: - return "ternary operator switch"; - - case QLNodeJoinList: - return "join: list"; - case QLNodeJoinInner: - return "join: inner"; - case QLNodeJoinLeft: - return "join: left"; - case QLNodeJoinRight: - return "join: right"; - - case QLNodeValueUndefined: - return "value: undefined"; - case QLNodeValueNull: - return "value: null"; - case QLNodeValueBool: - return "value: bool"; - case QLNodeValueString: - return "value: string"; - case QLNodeValueNumberInt: - return "value: number (int)"; - case QLNodeValueNumberDouble: - case QLNodeValueNumberDoubleString: - return "value: number (double)"; - case QLNodeValueArray: - return "value: array"; - case QLNodeValueDocument: - return "value: document"; - case QLNodeValueParameterNumeric: - return "value: numeric parameter"; - case QLNodeValueParameterNamed: - return "value: named parameter"; - case QLNodeValueIdentifier: - return "value: identifier"; - case QLNodeValueNamedValue: - return "value: named value"; - case QLNodeValueOrderDirection: - return "value: orderdirection"; - - case QLNodeReferenceCollection: - return "reference: collection"; - case QLNodeReferenceCollectionAlias: - return "reference: collection alias"; - - case QLNodeUnaryOperatorPlus: - return "unary: plus"; - case QLNodeUnaryOperatorMinus: - return "unary: minus"; - case QLNodeUnaryOperatorNot: - return "unary: not"; - - case QLNodeBinaryOperatorIn: - return "binary: in"; - case QLNodeBinaryOperatorAnd: - return "binary: and"; - case QLNodeBinaryOperatorOr: - return "binary: or"; - case QLNodeBinaryOperatorIdentical: - return "binary: identical"; - case QLNodeBinaryOperatorUnidentical: - return "binary: unidentical"; - case QLNodeBinaryOperatorEqual: - return "binary: equal"; - case QLNodeBinaryOperatorUnequal: - return "binary: unequal"; - case QLNodeBinaryOperatorLess: - return "binary: less"; - case QLNodeBinaryOperatorGreater: - return "binary: greater"; - case QLNodeBinaryOperatorLessEqual: - return "binary: lessequal"; - case QLNodeBinaryOperatorGreaterEqual: - return "binary: greaterequal"; - case QLNodeBinaryOperatorAdd: - return "binary: add"; - case QLNodeBinaryOperatorSubtract: - return "binary: subtract"; - case QLNodeBinaryOperatorMultiply: - return "binary: multiply"; - case QLNodeBinaryOperatorDivide: - return "binary: divide"; - case QLNodeBinaryOperatorModulus: - return "binary: modulus"; - - case QLNodeControlFunctionCall: - return "function call"; - case QLNodeControlTernary: - return "ternary operator"; - - default: - return "unknown"; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the type group of a node based on its type -//////////////////////////////////////////////////////////////////////////////// - -QL_ast_node_type_group_e QLAstNodeGetTypeGroup (const QL_ast_node_type_e type) { - switch (type) { - case QLNodeContainerList: - case QLNodeContainerOrderElement: - case QLNodeContainerMemberAccess: - case QLNodeContainerTernarySwitch: - return QLNodeGroupContainer; - - case QLNodeJoinList: - case QLNodeJoinInner: - case QLNodeJoinLeft: - case QLNodeJoinRight: - return QLNodeGroupJoin; - - case QLNodeValueUndefined: - case QLNodeValueNull: - case QLNodeValueBool: - case QLNodeValueString: - case QLNodeValueNumberInt: - case QLNodeValueNumberDouble: - case QLNodeValueNumberDoubleString: - case QLNodeValueArray: - case QLNodeValueDocument: - case QLNodeValueParameterNumeric: - case QLNodeValueParameterNamed: - case QLNodeValueIdentifier: - case QLNodeValueOrderDirection: - return QLNodeGroupValue; - - case QLNodeReferenceCollection: - case QLNodeReferenceCollectionAlias: - return QLNodeGroupReference; - - case QLNodeUnaryOperatorPlus: - case QLNodeUnaryOperatorMinus: - case QLNodeUnaryOperatorNot: - return QLNodeGroupUnaryOperator; - - case QLNodeBinaryOperatorIn: - case QLNodeBinaryOperatorAnd: - case QLNodeBinaryOperatorOr: - case QLNodeBinaryOperatorIdentical: - case QLNodeBinaryOperatorUnidentical: - case QLNodeBinaryOperatorEqual: - case QLNodeBinaryOperatorUnequal: - case QLNodeBinaryOperatorLess: - case QLNodeBinaryOperatorGreater: - case QLNodeBinaryOperatorLessEqual: - case QLNodeBinaryOperatorGreaterEqual: - case QLNodeBinaryOperatorAdd: - case QLNodeBinaryOperatorSubtract: - case QLNodeBinaryOperatorMultiply: - case QLNodeBinaryOperatorDivide: - case QLNodeBinaryOperatorModulus: - return QLNodeGroupBinaryOperator; - - case QLNodeControlFunctionCall: - case QLNodeControlTernary: - return QLNodeGroupControl; - - default: - return QLNodeGroupUndefined; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the label string for a unary operator -//////////////////////////////////////////////////////////////////////////////// - -char* QLAstNodeGetUnaryOperatorString (const QL_ast_node_type_e type) { - switch (type) { - case QLNodeUnaryOperatorPlus: - return "+"; - case QLNodeUnaryOperatorMinus: - return "-"; - case QLNodeUnaryOperatorNot: - return "!"; - default: - return ""; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the label string for a binary operator -//////////////////////////////////////////////////////////////////////////////// - -char* QLAstNodeGetBinaryOperatorString (const QL_ast_node_type_e type) { - switch (type) { - case QLNodeBinaryOperatorAnd: - return "&&"; - case QLNodeBinaryOperatorOr: - return "||"; - case QLNodeBinaryOperatorIdentical: - return "==="; - case QLNodeBinaryOperatorUnidentical: - return "!=="; - case QLNodeBinaryOperatorEqual: - return "=="; - case QLNodeBinaryOperatorUnequal: - return "!="; - case QLNodeBinaryOperatorLess: - return "<"; - case QLNodeBinaryOperatorGreater: - return ">"; - case QLNodeBinaryOperatorLessEqual: - return "<="; - case QLNodeBinaryOperatorGreaterEqual: - return ">="; - case QLNodeBinaryOperatorAdd: - return "+"; - case QLNodeBinaryOperatorSubtract: - return "-"; - case QLNodeBinaryOperatorMultiply: - return "*"; - case QLNodeBinaryOperatorDivide: - return "/"; - case QLNodeBinaryOperatorModulus: - return "%"; - case QLNodeBinaryOperatorIn: - return " in "; - default: - return ""; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is a value node -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsValueNode (const QL_ast_node_t* node) { - switch (node->_type) { - case QLNodeValueUndefined: - case QLNodeValueNull: - case QLNodeValueBool: - case QLNodeValueString: - case QLNodeValueNumberInt: - case QLNodeValueNumberDouble: - case QLNodeValueNumberDoubleString: - case QLNodeValueArray: - case QLNodeValueDocument: - case QLNodeValueParameterNumeric: - case QLNodeValueParameterNamed: - case QLNodeValueIdentifier: - case QLNodeValueNamedValue: - case QLNodeValueOrderDirection: - return true; - default: - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is a logical operator -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsArithmeticOperator (const QL_ast_node_t* node) { - switch (node->_type) { - case QLNodeBinaryOperatorAdd: - case QLNodeBinaryOperatorSubtract: - case QLNodeBinaryOperatorMultiply: - case QLNodeBinaryOperatorDivide: - case QLNodeBinaryOperatorModulus: - return true; - default: - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is a unary operator -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsUnaryOperator (const QL_ast_node_t* node) { - switch (node->_type) { - case QLNodeUnaryOperatorPlus: - case QLNodeUnaryOperatorMinus: - case QLNodeUnaryOperatorNot: - return true; - default: - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is a binary operator -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsBinaryOperator (const QL_ast_node_t* node) { - switch (node->_type) { - case QLNodeBinaryOperatorIn: - case QLNodeBinaryOperatorAnd: - case QLNodeBinaryOperatorOr: - case QLNodeBinaryOperatorIdentical: - case QLNodeBinaryOperatorUnidentical: - case QLNodeBinaryOperatorEqual: - case QLNodeBinaryOperatorUnequal: - case QLNodeBinaryOperatorLess: - case QLNodeBinaryOperatorGreater: - case QLNodeBinaryOperatorLessEqual: - case QLNodeBinaryOperatorGreaterEqual: - case QLNodeBinaryOperatorAdd: - case QLNodeBinaryOperatorSubtract: - case QLNodeBinaryOperatorMultiply: - case QLNodeBinaryOperatorDivide: - case QLNodeBinaryOperatorModulus: - return true; - default: - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is the ternary operator -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsTernaryOperator (const QL_ast_node_t* node) { - return (node->_type == QLNodeControlTernary); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is a logical operator -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsLogicalOperator (const QL_ast_node_t* node) { - switch (node->_type) { - case QLNodeBinaryOperatorAnd: - case QLNodeBinaryOperatorOr: - case QLNodeUnaryOperatorNot: - return true; - default: - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is a relational operator -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsRelationalOperator (const QL_ast_node_t* node) { - switch (node->_type) { - case QLNodeBinaryOperatorIdentical: - case QLNodeBinaryOperatorUnidentical: - case QLNodeBinaryOperatorEqual: - case QLNodeBinaryOperatorUnequal: - case QLNodeBinaryOperatorLess: - case QLNodeBinaryOperatorGreater: - case QLNodeBinaryOperatorLessEqual: - case QLNodeBinaryOperatorGreaterEqual: - return true; - default: - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief return whether a node is a constant -//////////////////////////////////////////////////////////////////////////////// - -bool QLAstNodeIsBooleanizable (const QL_ast_node_t* node) { - switch (node->_type) { - case QLNodeValueBool: - // case QLNodeValueString: // TODO - case QLNodeValueNumberInt: - case QLNodeValueNumberDouble: - case QLNodeValueNumberDoubleString: - case QLNodeValueNull: - // case QLNodeValueArray: // TODO - return true; - default: - return false; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: - diff --git a/QL/ast-query.c b/QL/ast-query.c index e2ff780d68..3027959ee1 100644 --- a/QL/ast-query.c +++ b/QL/ast-query.c @@ -27,7 +27,6 @@ #include "QL/ast-query.h" - // ----------------------------------------------------------------------------- // --SECTION-- private functions // ----------------------------------------------------------------------------- @@ -51,8 +50,9 @@ static uint64_t HashKey (TRI_associative_pointer_t* array, void const* key) { /// @brief Hash function used to hash elements in the collection //////////////////////////////////////////////////////////////////////////////// -static uint64_t HashElement (TRI_associative_pointer_t* array, void const* element) { - QL_ast_query_collection_t *collection = (QL_ast_query_collection_t*) element; +static uint64_t HashCollectionElement (TRI_associative_pointer_t* array, + void const* element) { + QL_ast_query_collection_t* collection = (QL_ast_query_collection_t*) element; return TRI_FnvHashString(collection->_alias); } @@ -61,13 +61,41 @@ static uint64_t HashElement (TRI_associative_pointer_t* array, void const* eleme /// @brief Comparison function used to determine hash key equality //////////////////////////////////////////////////////////////////////////////// -static bool EqualKeyElement (TRI_associative_pointer_t* array, void const* key, void const* element) { +static bool EqualCollectionKeyElement (TRI_associative_pointer_t* array, + void const* key, + void const* element) { char const* k = (char const*) key; - QL_ast_query_collection_t *collection = (QL_ast_query_collection_t*) element; + QL_ast_query_collection_t* collection = (QL_ast_query_collection_t*) element; return TRI_EqualString(k, collection->_alias); } +//////////////////////////////////////////////////////////////////////////////// +/// @brief Hash function used to hash geo restrictions +//////////////////////////////////////////////////////////////////////////////// + +static uint64_t HashRestrictionElement (TRI_associative_pointer_t* array, + void const* element) { + QL_ast_query_geo_restriction_t* restriction = + (QL_ast_query_geo_restriction_t*) element; + + return TRI_FnvHashString(restriction->_alias); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Comparison function used to determine hash key equality +//////////////////////////////////////////////////////////////////////////////// + +static bool EqualRestrictionKeyElement (TRI_associative_pointer_t* array, + void const* key, + void const* element) { + char const* k = (char const*) key; + QL_ast_query_geo_restriction_t* restriction = + (QL_ast_query_geo_restriction_t*) element; + + return TRI_EqualString(k, restriction->_alias); +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -86,16 +114,22 @@ static bool EqualKeyElement (TRI_associative_pointer_t* array, void const* key, //////////////////////////////////////////////////////////////////////////////// void QLAstQueryInit (QL_ast_query_t* query) { - query->_type = QLQueryTypeUndefined; - query->_from._base = 0; - query->_where._base = 0; - query->_order._base = 0; + query->_type = QLQueryTypeUndefined; + query->_from._base = NULL; + query->_where._base = NULL; + query->_order._base = NULL; query->_limit._isUsed = false; TRI_InitAssociativePointer(&query->_from._collections, HashKey, - HashElement, - EqualKeyElement, + HashCollectionElement, + EqualCollectionKeyElement, + 0); + + TRI_InitAssociativePointer(&query->_geo._restrictions, + HashKey, + HashRestrictionElement, + EqualRestrictionKeyElement, 0); } @@ -104,28 +138,109 @@ void QLAstQueryInit (QL_ast_query_t* query) { //////////////////////////////////////////////////////////////////////////////// void QLAstQueryFree (QL_ast_query_t* query) { + QL_ast_query_collection_t* collection; + QL_ast_query_geo_restriction_t* restriction; size_t i; - void* ptr; // destroy all elements in collection array for (i = 0; i < query->_from._collections._nrAlloc; i++) { - ptr = query->_from._collections._table[i]; - - if (ptr != 0) { - TRI_Free(ptr); + collection = (QL_ast_query_collection_t*) query->_from._collections._table[i]; + if (collection) { + TRI_Free(collection); } } - - // destroy array itself + // destroy collection array itself TRI_DestroyAssociativePointer(&query->_from._collections); + + + // destroy all elements in restrictions array + for (i = 0; i < query->_geo._restrictions._nrAlloc; i++) { + restriction = (QL_ast_query_geo_restriction_t*) query->_geo._restrictions._table[i]; + if (restriction) { + QLAstQueryFreeRestriction(restriction); + } + } + // destroy restrictions array + TRI_DestroyAssociativePointer(&query->_geo._restrictions); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the ref count for a collection +//////////////////////////////////////////////////////////////////////////////// + +size_t QLAstQueryGetRefCount (QL_ast_query_t* query, const char* alias) { + QL_ast_query_collection_t* collection = (QL_ast_query_collection_t*) + TRI_LookupByKeyAssociativePointer(&query->_from._collections, alias); + + if (collection != 0) { + return collection->_refCount; + } + + // return a number > 0 if collection not found so nothing happens with it + return 1; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Increment ref count for a collection +//////////////////////////////////////////////////////////////////////////////// + +void QLAstQueryAddRefCount (QL_ast_query_t* query, const char* alias) { + QL_ast_query_collection_t* collection = (QL_ast_query_collection_t*) + TRI_LookupByKeyAssociativePointer(&query->_from._collections, alias); + + if (collection != 0) { + ++collection->_refCount; + } } //////////////////////////////////////////////////////////////////////////////// /// @brief Check if a collection was defined in a query //////////////////////////////////////////////////////////////////////////////// -bool QLAstQueryIsValidAlias (QL_ast_query_t* query, const char* alias) { - return (0 != TRI_LookupByKeyAssociativePointer (&query->_from._collections, alias)); +bool QLAstQueryIsValidAlias (QL_ast_query_t* query, + const char* alias, + const size_t order) { + if (0 != TRI_LookupByKeyAssociativePointer(&query->_from._collections, alias)) { + return true; + } + + return (0 != TRI_LookupByKeyAssociativePointer(&query->_geo._restrictions, alias)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Check if a collection was defined in a query, taking order of +/// declaration into account +//////////////////////////////////////////////////////////////////////////////// + +bool QLAstQueryIsValidAliasOrdered (QL_ast_query_t* query, + const char* alias, + const size_t order) { + QL_ast_query_collection_t* collection; + + collection = (QL_ast_query_collection_t*) + TRI_LookupByKeyAssociativePointer(&query->_from._collections, alias); + + if (!collection) { + return false; + } + + return (collection->_declarationOrder <= order); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Return the collection name for its alias +//////////////////////////////////////////////////////////////////////////////// + +char* QLAstQueryGetCollectionNameForAlias (QL_ast_query_t* query, + const char* alias) { + QL_ast_query_collection_t* collection; + + collection = (QL_ast_query_collection_t*) + TRI_LookupByKeyAssociativePointer(&query->_from._collections, alias); + if (!collection) { + return NULL; + } + return collection->_name; } //////////////////////////////////////////////////////////////////////////////// @@ -134,50 +249,50 @@ bool QLAstQueryIsValidAlias (QL_ast_query_t* query, const char* alias) { bool QLAstQueryAddCollection (QL_ast_query_t* query, const char* name, - const char* alias, - const bool isPrimary) { - QL_ast_query_collection_t *collection; - QL_ast_query_collection_t *previous; + const char* alias) { + QL_ast_query_collection_t* collection; + void* previous; + size_t num; - previous = (QL_ast_query_collection_t *) TRI_LookupByKeyAssociativePointer (&query->_from._collections, alias); - - if (previous != 0) { - // element is already present - return an error + previous = (void*) TRI_LookupByKeyAssociativePointer(&query->_from._collections, + alias); + if (previous) { + // alias has already been declared for another collection - return an error return false; } - collection = (QL_ast_query_collection_t *) TRI_Allocate(sizeof(QL_ast_query_collection_t)); - if (collection == 0) { + previous = (void*) TRI_LookupByKeyAssociativePointer(&query->_geo._restrictions, + alias); + if (previous) { + // alias has already been declared for a geo restriction - return an error return false; } - collection->_name = (char *) name; - collection->_alias = (char *) alias; - collection->_isPrimary = isPrimary; - TRI_InsertKeyAssociativePointer(&query->_from._collections, collection->_alias, collection, true); + collection = (QL_ast_query_collection_t *) + TRI_Allocate(sizeof(QL_ast_query_collection_t)); + if (!collection) { + return false; + } + + num = query->_from._collections._nrUsed; + + collection->_name = (char*) name; + collection->_alias = (char*) alias; + // first collection added is always the primary collection + collection->_isPrimary = (num == 0); + collection->_refCount = 0; // will be used later when optimizing joins + collection->_declarationOrder = num + 1; + collection->_geoRestriction = NULL; + + TRI_InsertKeyAssociativePointer(&query->_from._collections, + collection->_alias, + collection, + true); return true; } -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the name of the primary collection used in the query -//////////////////////////////////////////////////////////////////////////////// - -char* QLAstQueryGetPrimaryName (const QL_ast_query_t* query) { - size_t i; - QL_ast_query_collection_t *collection; - - for (i = 0; i < query->_from._collections._nrAlloc; i++) { - collection = query->_from._collections._table[i]; - if (collection != 0 && collection->_isPrimary) { - return collection->_name; - } - } - - return 0; -} - //////////////////////////////////////////////////////////////////////////////// /// @brief get the alias of the primary collection used in the query //////////////////////////////////////////////////////////////////////////////// @@ -196,6 +311,269 @@ char* QLAstQueryGetPrimaryAlias (const QL_ast_query_t* query) { return 0; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief get a geo restriction prototype +//////////////////////////////////////////////////////////////////////////////// + +QL_ast_query_geo_restriction_t* QLAstQueryCreateRestriction (void) { + QL_ast_query_geo_restriction_t* restriction; + + restriction = (QL_ast_query_geo_restriction_t*) + TRI_Allocate(sizeof(QL_ast_query_geo_restriction_t)); + if (!restriction) { + return NULL; + } + restriction->_alias = NULL; + restriction->_compareLat._collection = NULL; + restriction->_compareLat._field = NULL; + restriction->_compareLon._collection = NULL; + restriction->_compareLon._field = NULL; + + return restriction; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief clone a geo restriction +//////////////////////////////////////////////////////////////////////////////// + +QL_ast_query_geo_restriction_t* QLAstQueryCloneRestriction + (const QL_ast_query_geo_restriction_t* source) { + QL_ast_query_geo_restriction_t* dest; + + if (!source) { + return NULL; + } + + dest = QLAstQueryCreateRestriction(); + if (!dest) { + return NULL; + } + + dest->_type = source->_type; + dest->_alias = TRI_DuplicateString(source->_alias); + dest->_compareLat._collection = TRI_DuplicateString(source->_compareLat._collection); + dest->_compareLat._field = TRI_DuplicateString(source->_compareLat._field); + dest->_compareLon._collection = TRI_DuplicateString(source->_compareLon._collection); + dest->_compareLon._field = TRI_DuplicateString(source->_compareLon._field); + dest->_lat = source->_lat; + dest->_lon = source->_lon; + dest->_arg = source->_arg; + + return dest; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free a geo restriction +//////////////////////////////////////////////////////////////////////////////// + +void QLAstQueryFreeRestriction (QL_ast_query_geo_restriction_t* restriction) { + if (restriction->_compareLat._collection) { + TRI_Free(restriction->_compareLat._collection); + } + if (restriction->_compareLat._field) { + TRI_Free(restriction->_compareLat._field); + } + if (restriction->_compareLon._collection) { + TRI_Free(restriction->_compareLon._collection); + } + if (restriction->_compareLon._field) { + TRI_Free(restriction->_compareLon._field); + } + TRI_Free(restriction); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief add a geo restriction +//////////////////////////////////////////////////////////////////////////////// + +bool QLAstQueryAddGeoRestriction (QL_ast_query_t* query, + const TRI_query_node_t* collectionNode, + const TRI_query_node_t* restrictionNode) { + TRI_query_node_t* valueNode; + QL_ast_query_collection_t* collection; + QL_ast_query_geo_restriction_t* restriction; + TRI_string_buffer_t* fieldName; + char* alias; + char* collectionAlias; + void* previous; + + if (!collectionNode || !restrictionNode) { + return false; + } + + alias = restrictionNode->_lhs->_value._stringValue; + assert(alias); + + previous = (void*) TRI_LookupByKeyAssociativePointer(&query->_from._collections, + alias); + if (previous) { + // alias is already used for another collection + return false; + } + + previous = (void*) TRI_LookupByKeyAssociativePointer(&query->_geo._restrictions, + alias); + if (previous) { + // alias is already used for another geo restriction + return false; + } + + collectionAlias = ((TRI_query_node_t*) collectionNode->_rhs)->_value._stringValue; + assert(collectionAlias); + + collection = (QL_ast_query_collection_t*) + TRI_LookupByKeyAssociativePointer(&query->_from._collections, collectionAlias); + + if (!collection) { + // collection is not present - should not happen + return false; + } + + assert(restrictionNode->_lhs); + assert(restrictionNode->_rhs); + + restriction = QLAstQueryCreateRestriction(); + if (!restriction) { + return false; + } + restriction->_alias = alias; + + if (restrictionNode->_type == TRI_QueryNodeRestrictWithin) { + restriction->_type = RESTRICT_WITHIN; + } + else { + restriction->_type = RESTRICT_NEAR; + } + + // compare field 1 + valueNode = restrictionNode->_rhs->_lhs->_lhs; + if (strcmp(valueNode->_lhs->_value._stringValue, + collectionAlias) != 0) { + // field is from other collection, not valid! + QLAstQueryFreeRestriction(restriction); + return false; + } + + fieldName = QLAstQueryGetMemberNameString(valueNode, false); + if (fieldName) { + restriction->_compareLat._collection = + TRI_DuplicateString(valueNode->_lhs->_value._stringValue); + restriction->_compareLat._field = TRI_DuplicateString(fieldName->_buffer); + TRI_FreeStringBuffer(fieldName); + TRI_Free(fieldName); + } + else { + QLAstQueryFreeRestriction(restriction); + return false; + } + + // compare field 2 + valueNode = restrictionNode->_rhs->_lhs->_rhs; + if (strcmp(valueNode->_lhs->_value._stringValue, + collectionAlias) != 0) { + // field is from other collection, not valid! + QLAstQueryFreeRestriction(restriction); + return false; + } + + fieldName = QLAstQueryGetMemberNameString(valueNode, false); + if (fieldName) { + restriction->_compareLon._collection = + TRI_DuplicateString(valueNode->_lhs->_value._stringValue); + restriction->_compareLon._field = TRI_DuplicateString(fieldName->_buffer); + TRI_FreeStringBuffer(fieldName); + TRI_Free(fieldName); + } + else { + QLAstQueryFreeRestriction(restriction); + return false; + } + + // lat value + valueNode = restrictionNode->_rhs->_rhs->_lhs; + restriction->_lat = valueNode->_value._doubleValue; + + // lon value + valueNode = restrictionNode->_rhs->_rhs->_rhs; + restriction->_lon = valueNode->_value._doubleValue; + + if (restrictionNode->_type == TRI_QueryNodeRestrictWithin) { + restriction->_arg._radius = restrictionNode->_value._doubleValue; + } + else { + restriction->_arg._numDocuments = restrictionNode->_value._intValue; + } + + TRI_InsertKeyAssociativePointer(&query->_geo._restrictions, + alias, + restriction, + true); + + collection->_geoRestriction = restriction; + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a string from a member name +//////////////////////////////////////////////////////////////////////////////// + +TRI_string_buffer_t* QLAstQueryGetMemberNameString (TRI_query_node_t* node, + bool includeCollection) { + TRI_query_node_t *lhs, *rhs; + TRI_string_buffer_t* buffer; + + buffer = (TRI_string_buffer_t*) TRI_Allocate(sizeof(TRI_string_buffer_t)); + if (!buffer) { + return NULL; + } + + TRI_InitStringBuffer(buffer); + + if (includeCollection) { + // add collection part + lhs = node->_lhs; + TRI_AppendStringStringBuffer(buffer, lhs->_value._stringValue); + TRI_AppendCharStringBuffer(buffer, '.'); + } + + rhs = node->_rhs; + node = rhs->_next; + + while (node) { + // add individual name parts + TRI_AppendStringStringBuffer(buffer, node->_value._stringValue); + node = node->_next; + if (node) { + TRI_AppendCharStringBuffer(buffer, '.'); + } + } + + return buffer; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Hash a member name for comparisons +//////////////////////////////////////////////////////////////////////////////// + +uint64_t QLAstQueryGetMemberNameHash (TRI_query_node_t* node) { + TRI_query_node_t *lhs, *rhs; + uint64_t hashValue; + + lhs = node->_lhs; + hashValue = TRI_FnvHashString(lhs->_value._stringValue); + + rhs = node->_rhs; + node = rhs->_next; + + while (node) { + hashValue ^= TRI_FnvHashString(node->_value._stringValue); + node = node->_next; + } + + return hashValue; +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/QL/ast-query.h b/QL/ast-query.h index 61f25e6a3f..8786c65cd7 100644 --- a/QL/ast-query.h +++ b/QL/ast-query.h @@ -31,21 +31,19 @@ #include #include +#include #include #include #include #include +#include -#include "QL/ast-node.h" - - -#define QL_QUERY_NAME_LEN 64 +#include "VocBase/query-node.h" #ifdef __cplusplus extern "C" { #endif - //////////////////////////////////////////////////////////////////////////////// /// @addtogroup QL /// @{ @@ -88,12 +86,25 @@ typedef enum { } QL_ast_query_where_type_e; +//////////////////////////////////////////////////////////////////////////////// +/// @brief ORDER BY types of a query +//////////////////////////////////////////////////////////////////////////////// + +typedef enum { + QLQueryOrderTypeUndefined = 0, + + QLQueryOrderTypeMustEvaluate, + QLQueryOrderTypeNone +} +QL_ast_query_order_type_e; + //////////////////////////////////////////////////////////////////////////////// /// @brief SELECT part of a query //////////////////////////////////////////////////////////////////////////////// typedef struct QL_ast_query_select_s { - QL_ast_node_t *_base; + TRI_query_node_t* _base; + QL_ast_query_select_type_e _type; } QL_ast_query_select_t; @@ -102,7 +113,7 @@ QL_ast_query_select_t; //////////////////////////////////////////////////////////////////////////////// typedef struct QL_ast_query_from_s { - QL_ast_node_t *_base; + TRI_query_node_t* _base; TRI_associative_pointer_t _collections; } QL_ast_query_from_t; @@ -112,8 +123,8 @@ QL_ast_query_from_t; //////////////////////////////////////////////////////////////////////////////// typedef struct QL_ast_query_where_s { - QL_ast_node_t *_base; - QL_ast_query_where_type_e _type; + TRI_query_node_t* _base; + QL_ast_query_where_type_e _type; } QL_ast_query_where_t; @@ -122,7 +133,8 @@ QL_ast_query_where_t; //////////////////////////////////////////////////////////////////////////////// typedef struct QL_ast_query_order_s { - QL_ast_node_t *_base; + TRI_query_node_t* _base; + QL_ast_query_order_type_e _type; } QL_ast_query_order_t; @@ -138,6 +150,49 @@ typedef struct QL_ast_query_limit_s { } QL_ast_query_limit_t; +//////////////////////////////////////////////////////////////////////////////// +/// @brief Geo restriction types +//////////////////////////////////////////////////////////////////////////////// + +typedef enum { + RESTRICT_WITHIN = 1, + RESTRICT_NEAR = 2 +} +QL_ast_query_geo_restriction_e; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief single geo restriction +//////////////////////////////////////////////////////////////////////////////// + +typedef struct QL_ast_query_geo_restriction_s { + char* _alias; + QL_ast_query_geo_restriction_e _type; + struct { + char* _collection; + char* _field; + } _compareLat; + struct { + char* _collection; + char* _field; + } _compareLon; + double _lat; + double _lon; + union { + double _radius; + size_t _numDocuments; + } _arg; +} +QL_ast_query_geo_restriction_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Geo restrictions of a query +//////////////////////////////////////////////////////////////////////////////// + +typedef struct QL_ast_query_geo_s { + TRI_associative_pointer_t _restrictions; +} +QL_ast_query_geo_t; + //////////////////////////////////////////////////////////////////////////////// /// @brief Query declaration /// @@ -156,6 +211,7 @@ typedef struct QL_ast_query_s { QL_ast_query_where_t _where; QL_ast_query_order_t _order; QL_ast_query_limit_t _limit; + QL_ast_query_geo_t _geo; } QL_ast_query_t; @@ -164,9 +220,12 @@ QL_ast_query_t; //////////////////////////////////////////////////////////////////////////////// typedef struct QL_ast_query_collection_s { - char *_name; - char *_alias; - bool _isPrimary; + char* _name; + char* _alias; + bool _isPrimary; + size_t _refCount; + size_t _declarationOrder; + QL_ast_query_geo_restriction_t* _geoRestriction; } QL_ast_query_collection_t; @@ -182,23 +241,42 @@ void QLAstQueryInit (QL_ast_query_t*); void QLAstQueryFree (QL_ast_query_t*); +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the ref count for a collection +//////////////////////////////////////////////////////////////////////////////// + +size_t QLAstQueryGetRefCount (QL_ast_query_t*, const char*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Increment ref count for a collection +//////////////////////////////////////////////////////////////////////////////// + +void QLAstQueryAddRefCount (QL_ast_query_t*, const char*); + //////////////////////////////////////////////////////////////////////////////// /// @brief Check if a collection was defined in a query //////////////////////////////////////////////////////////////////////////////// -bool QLAstQueryIsValidAlias (QL_ast_query_t*, const char*); +bool QLAstQueryIsValidAlias (QL_ast_query_t*, const char*, const size_t); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Check if a collection was defined in a query, taking order of +/// declaration into account +//////////////////////////////////////////////////////////////////////////////// + +bool QLAstQueryIsValidAliasOrdered (QL_ast_query_t*, const char*, const size_t); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Return the collection name for its alias +//////////////////////////////////////////////////////////////////////////////// + +char* QLAstQueryGetCollectionNameForAlias (QL_ast_query_t*, const char*); //////////////////////////////////////////////////////////////////////////////// /// @brief Add a collection to the query //////////////////////////////////////////////////////////////////////////////// -bool QLAstQueryAddCollection (QL_ast_query_t*, const char*, const char*, const bool); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get the name of the primary collection used in the query -//////////////////////////////////////////////////////////////////////////////// - -char* QLAstQueryGetPrimaryName (const QL_ast_query_t*); +bool QLAstQueryAddCollection (QL_ast_query_t*, const char*, const char*); //////////////////////////////////////////////////////////////////////////////// /// @brief get the alias of the primary collection used in the query @@ -206,6 +284,45 @@ char* QLAstQueryGetPrimaryName (const QL_ast_query_t*); char* QLAstQueryGetPrimaryAlias (const QL_ast_query_t*); +//////////////////////////////////////////////////////////////////////////////// +/// @brief get a geo restriction prototype +//////////////////////////////////////////////////////////////////////////////// + +QL_ast_query_geo_restriction_t* QLAstQueryCreateRestriction (void); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief clone a geo restriction +//////////////////////////////////////////////////////////////////////////////// + +QL_ast_query_geo_restriction_t* QLAstQueryCloneRestriction + (const QL_ast_query_geo_restriction_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free a geo restriction +//////////////////////////////////////////////////////////////////////////////// + +void QLAstQueryFreeRestriction (QL_ast_query_geo_restriction_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief add a geo restriction +//////////////////////////////////////////////////////////////////////////////// + +bool QLAstQueryAddGeoRestriction (QL_ast_query_t*, + const TRI_query_node_t*, + const TRI_query_node_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a string from a member name +//////////////////////////////////////////////////////////////////////////////// + +TRI_string_buffer_t* QLAstQueryGetMemberNameString (TRI_query_node_t*, bool); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Hash a member name for comparisons +//////////////////////////////////////////////////////////////////////////////// + +uint64_t QLAstQueryGetMemberNameHash (TRI_query_node_t*); + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/QL/error.c b/QL/error.c deleted file mode 100644 index 54e00745ba..0000000000 --- a/QL/error.c +++ /dev/null @@ -1,87 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief error codes and translations -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Jan Steemann -/// @author Copyright 2012, triagens GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - - -#include "QL/error.h" - - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get label/translation for an error code -//////////////////////////////////////////////////////////////////////////////// - -char *QLErrorGetLabel (const QL_error_type_e errorCode) { - switch (errorCode) { - case ERR_PARSE: - return "parse error: %s"; - case ERR_NUMBER_OUT_OF_RANGE: - return "number '%s' is out of range"; - case ERR_LIMIT_VALUE_OUT_OF_RANGE: - return "limit value '%s' is out of range"; - case ERR_PARAMETER_NUMBER_OUT_OF_RANGE: - return "parameter number '%s' is out of range"; - case ERR_COLLECTION_NAME_INVALID: - return "collection name '%s' or alias is invalid"; - case ERR_COLLECTION_NAME_REDECLARED: - return "collection alias '%s' is declared multiple times"; - case ERR_COLLECTION_NAME_UNDECLARED: - return "collection alias '%s' was not declared in the from clause"; - default: - return "unknown error"; - } -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create a formatted error message with wildcards replaced -//////////////////////////////////////////////////////////////////////////////// - -char *QLErrorFormat(const QL_error_type_e errorCode, va_list args) { - char buffer[1024]; - char *format; - - format = QLErrorGetLabel(errorCode); - - vsnprintf(buffer, sizeof(buffer), format, args); - - return (char *) TRI_DuplicateString((const char*) &buffer); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: - diff --git a/QL/error.h b/QL/error.h deleted file mode 100644 index be5f86784d..0000000000 --- a/QL/error.h +++ /dev/null @@ -1,93 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief error codes and translations -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Jan Steemann -/// @author Copyright 2012, triagens GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#ifndef TRIAGENS_DURHAM_QL_ERROR -#define TRIAGENS_DURHAM_QL_ERROR - -#include -#include - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief enumeration of possible parse errors -//////////////////////////////////////////////////////////////////////////////// - -typedef enum { - ERR_OK = 0, - ERR_PARSE = 1, - ERR_NUMBER_OUT_OF_RANGE = 100, - ERR_PARAMETER_NUMBER_OUT_OF_RANGE = 101, - ERR_LIMIT_VALUE_OUT_OF_RANGE = 102, - ERR_COLLECTION_NAME_INVALID = 110, - ERR_COLLECTION_NAME_REDECLARED = 111, - ERR_COLLECTION_NAME_UNDECLARED = 112, - - ERR_LAST -} -QL_error_type_e; - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief get label/translation for an error code -//////////////////////////////////////////////////////////////////////////////// - -char *QLErrorGetLabel (const QL_error_type_e); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create a formatted error message with wildcards replaced -//////////////////////////////////////////////////////////////////////////////// - -char *QLErrorFormat(const QL_error_type_e, va_list args); - - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -} -#endif - -#endif - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: - diff --git a/QL/formatter.c b/QL/formatter.c index de672858f0..ad8a871dd7 100644 --- a/QL/formatter.c +++ b/QL/formatter.c @@ -25,7 +25,6 @@ /// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// - #include "QL/formatter.h" //////////////////////////////////////////////////////////////////////////////// @@ -38,7 +37,7 @@ //////////////////////////////////////////////////////////////////////////////// void QLFormatterIndentationInc (QL_formatter_t* formatter) { - formatter->indentLevel++; + formatter->_indentLevel++; } //////////////////////////////////////////////////////////////////////////////// @@ -46,7 +45,7 @@ void QLFormatterIndentationInc (QL_formatter_t* formatter) { //////////////////////////////////////////////////////////////////////////////// void QLFormatterIndentationDec (QL_formatter_t* formatter) { - formatter->indentLevel--; + formatter->_indentLevel--; } //////////////////////////////////////////////////////////////////////////////// @@ -56,7 +55,7 @@ void QLFormatterIndentationDec (QL_formatter_t* formatter) { void QLFormatterPrintIndentation (QL_formatter_t* formatter) { unsigned int i=0; - for (; i < formatter->indentLevel; i++) { + for (; i < formatter->_indentLevel; i++) { printf(" "); } } @@ -110,26 +109,26 @@ void QLFormatterPrintStr (QL_formatter_t* formatter, const char* name, const cha /// @brief Recursively dump an AST //////////////////////////////////////////////////////////////////////////////// -void QLFormatterDump (QL_ast_node_t* node, QL_formatter_t* formatter, const int blockBehaviour) { +void QLFormatterDump (TRI_query_node_t* node, QL_formatter_t* formatter) { const char* name; - QL_ast_node_type_e type; - QL_ast_node_t *lhs; - QL_ast_node_t *rhs; - QL_ast_node_t *next; + TRI_query_node_type_e type; + TRI_query_node_t* lhs; + TRI_query_node_t* rhs; + TRI_query_node_t* next; - if (node == 0) { + if (!node) { return; } type = node->_type; - name = QLAstNodeGetName(type); + name = TRI_QueryNodeGetName(type); - if (type == QLNodeContainerList) { + if (type == TRI_QueryNodeContainerList) { next = node->_next; QLFormatterPrintBlockStart(formatter,name); QLFormatterIndentationInc(formatter); while (next) { - QLFormatterDump(next,formatter,1); + QLFormatterDump(next,formatter); next = next->_next; } QLFormatterIndentationDec(formatter); @@ -140,30 +139,32 @@ void QLFormatterDump (QL_ast_node_t* node, QL_formatter_t* formatter, const int QLFormatterPrintBlockStart(formatter,name); QLFormatterIndentationInc(formatter); - if (type == QLNodeValueString || type ==QLNodeValueNumberDoubleString || - type == QLNodeValueIdentifier || type == QLNodeValueParameterNamed || - type == QLNodeReferenceCollectionAlias) { - QLFormatterPrintStr(formatter,"value",node->_value._stringValue); - } else if (type == QLNodeValueNumberInt) { - QLFormatterPrintInt(formatter,"value",node->_value._intValue); - } else if (type == QLNodeValueNumberDouble) { - QLFormatterPrintDouble(formatter,"value",node->_value._doubleValue); - } else if (type == QLNodeValueBool) { - QLFormatterPrintStr(formatter,"value",node->_value._boolValue ? "true" : "false"); - } else if (type == QLNodeValueOrderDirection) { - QLFormatterPrintStr(formatter,"value",node->_value._boolValue ? "asc" : "desc"); - } else if (type == QLNodeValueParameterNumeric) { - QLFormatterPrintInt(formatter,"value",node->_value._intValue); + if (type == TRI_QueryNodeValueString || + type == TRI_QueryNodeValueNumberDoubleString || + type == TRI_QueryNodeValueIdentifier || + type == TRI_QueryNodeValueParameterNamed || + type == TRI_QueryNodeReferenceCollectionAlias) { + QLFormatterPrintStr(formatter,"value", node->_value._stringValue); + } else if (type == TRI_QueryNodeValueNumberInt) { + QLFormatterPrintInt(formatter,"value", node->_value._intValue); + } else if (type == TRI_QueryNodeValueNumberDouble) { + QLFormatterPrintDouble(formatter,"value", node->_value._doubleValue); + } else if (type == TRI_QueryNodeValueBool) { + QLFormatterPrintStr(formatter,"value", node->_value._boolValue ? "true" : "false"); + } else if (type == TRI_QueryNodeValueOrderDirection) { + QLFormatterPrintStr(formatter,"value", node->_value._boolValue ? "asc" : "desc"); + } else if (type == TRI_QueryNodeValueParameterNumeric) { + QLFormatterPrintInt(formatter,"value", node->_value._intValue); } lhs = node->_lhs; - if (lhs != 0) { - QLFormatterDump(lhs,formatter,0); + if (lhs) { + QLFormatterDump(lhs, formatter); } rhs = node->_rhs; - if (rhs != 0) { - QLFormatterDump(rhs,formatter,0); + if (rhs) { + QLFormatterDump(rhs, formatter); } QLFormatterIndentationDec(formatter); diff --git a/QL/formatter.h b/QL/formatter.h index f9a619b866..bcc20d3e5b 100644 --- a/QL/formatter.h +++ b/QL/formatter.h @@ -25,20 +25,19 @@ /// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_DURHAM_QL_FORMATTER -#define TRIAGENS_DURHAM_QL_FORMATTER +#ifndef TRIAGENS_DURHAM_QL_FORMATTER_H +#define TRIAGENS_DURHAM_QL_FORMATTER_H 1 #include #include #include -#include "QL/ast-node.h" +#include "VocBase/query-node.h" #ifdef __cplusplus extern "C" { #endif - //////////////////////////////////////////////////////////////////////////////// /// @addtogroup QL /// @{ @@ -49,7 +48,7 @@ extern "C" { //////////////////////////////////////////////////////////////////////////////// typedef struct QL_formatter_s { - unsigned int indentLevel; + unsigned int _indentLevel; } QL_formatter_t; @@ -105,7 +104,7 @@ void QLFormatterPrintStr (QL_formatter_t*, const char*, const char*); /// @brief Recursively dump an AST //////////////////////////////////////////////////////////////////////////////// -void QLFormatterDump (QL_ast_node_t*,QL_formatter_t*, const int); +void QLFormatterDump (TRI_query_node_t*, QL_formatter_t*); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/QL/javascripter.c b/QL/javascripter.c deleted file mode 100644 index c14504e190..0000000000 --- a/QL/javascripter.c +++ /dev/null @@ -1,283 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief AST to javascript-string conversion functions -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Jan Steemann -/// @author Copyright 2012, triagens GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - - -#include "QL/javascripter.h" - - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief initialize the to-Javascript conversion context -//////////////////////////////////////////////////////////////////////////////// - -QL_javascript_conversion_t *QLJavascripterInit (void) { - TRI_string_buffer_t *buffer; - QL_javascript_conversion_t *converter; - - converter = (QL_javascript_conversion_t *) TRI_Allocate(sizeof(QL_javascript_conversion_t)); - - if (converter == 0) { - return 0; - } - - // init - converter->_buffer = 0; - converter->_prefix = 0; - - buffer = (TRI_string_buffer_t *) TRI_Allocate(sizeof(TRI_string_buffer_t)); - if (buffer == 0) { - TRI_Free(converter); - return 0; - } - - TRI_InitStringBuffer(buffer); - converter->_buffer = buffer; - - return converter; -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief free the to-Javascript conversion text -//////////////////////////////////////////////////////////////////////////////// - -void QLJavascripterFree (QL_javascript_conversion_t *converter) { - if (converter == 0) { - return; - } - - TRI_FreeStringBuffer(converter->_buffer); - TRI_Free(converter->_buffer); - TRI_Free(converter); -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Walk a horizontal list of elements and print them -//////////////////////////////////////////////////////////////////////////////// - -void QLJavascripterWalkList (QL_javascript_conversion_t *converter, QL_ast_node_t *node, - const char separator, size_t counter) { - QL_ast_node_t *next; - - if (node == 0) { - return; - } - - next = node->_next; - - while (next != 0) { - if (counter++ > 0) { - TRI_AppendCharStringBuffer(converter->_buffer, separator); - } - QLJavascripterConvert(converter, next); - next = next->_next; - } -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create a javascript string by recursively walking an expression AST -//////////////////////////////////////////////////////////////////////////////// - -void QLJavascripterConvert (QL_javascript_conversion_t *converter, QL_ast_node_t *node) { - QL_ast_node_t *lhs, *rhs; - size_t outLength; - - if (node == 0) { - return; - } - - lhs = node->_lhs; - rhs = node->_rhs; - - switch (node->_type) { - case QLNodeValueUndefined: - TRI_AppendStringStringBuffer(converter->_buffer, "undefined"); - return; - case QLNodeValueNull: - TRI_AppendStringStringBuffer(converter->_buffer, "null"); - return; - case QLNodeValueBool: - TRI_AppendStringStringBuffer(converter->_buffer, node->_value._boolValue ? "true" : "false"); - return; - case QLNodeValueString: - TRI_AppendCharStringBuffer(converter->_buffer, '\''); - TRI_AppendStringStringBuffer(converter->_buffer, - TRI_EscapeUtf8String(node->_value._stringValue, strlen(node->_value._stringValue), false, &outLength)); - TRI_AppendCharStringBuffer(converter->_buffer, '\''); - return; - case QLNodeValueNumberInt: - TRI_AppendInt64StringBuffer(converter->_buffer, node->_value._intValue); - return; - case QLNodeValueNumberDouble: - TRI_AppendDoubleStringBuffer(converter->_buffer, node->_value._doubleValue); - return; - case QLNodeValueNumberDoubleString: - TRI_AppendStringStringBuffer(converter->_buffer, node->_value._stringValue); - return; - case QLNodeValueArray: - TRI_AppendCharStringBuffer(converter->_buffer, '['); - QLJavascripterWalkList(converter, rhs, ',', 0); - TRI_AppendCharStringBuffer(converter->_buffer, ']'); - return; - case QLNodeValueDocument: - TRI_AppendCharStringBuffer(converter->_buffer, '{'); - QLJavascripterWalkList(converter, rhs, ',', 0); - TRI_AppendCharStringBuffer(converter->_buffer, '}'); - return; - case QLNodeValueParameterNumeric: - case QLNodeValueParameterNamed: - // TODO: - return; - case QLNodeValueIdentifier: - TRI_AppendStringStringBuffer(converter->_buffer, node->_value._stringValue); - return; - case QLNodeValueNamedValue: - QLJavascripterConvert(converter, lhs); - TRI_AppendCharStringBuffer(converter->_buffer, ':'); - QLJavascripterConvert(converter, rhs); - return; - case QLNodeReferenceCollectionAlias: - if (converter->_prefix == 0) { - TRI_AppendStringStringBuffer(converter->_buffer, "$['"); - TRI_AppendStringStringBuffer(converter->_buffer, node->_value._stringValue); - TRI_AppendStringStringBuffer(converter->_buffer, "']"); - } - else { - TRI_AppendStringStringBuffer(converter->_buffer, "$['"); - TRI_AppendStringStringBuffer(converter->_buffer, converter->_prefix); - TRI_AppendStringStringBuffer(converter->_buffer, "']."); - TRI_AppendStringStringBuffer(converter->_buffer, node->_value._stringValue); - } - return; - case QLNodeUnaryOperatorPlus: - case QLNodeUnaryOperatorMinus: - case QLNodeUnaryOperatorNot: - TRI_AppendStringStringBuffer(converter->_buffer, QLAstNodeGetUnaryOperatorString(node->_type)); - QLJavascripterConvert(converter, lhs); - return; - case QLNodeBinaryOperatorAnd: - case QLNodeBinaryOperatorOr: - case QLNodeBinaryOperatorIdentical: - case QLNodeBinaryOperatorUnidentical: - case QLNodeBinaryOperatorEqual: - case QLNodeBinaryOperatorUnequal: - case QLNodeBinaryOperatorLess: - case QLNodeBinaryOperatorGreater: - case QLNodeBinaryOperatorLessEqual: - case QLNodeBinaryOperatorGreaterEqual: - case QLNodeBinaryOperatorAdd: - case QLNodeBinaryOperatorSubtract: - case QLNodeBinaryOperatorMultiply: - case QLNodeBinaryOperatorDivide: - case QLNodeBinaryOperatorModulus: - case QLNodeBinaryOperatorIn: - TRI_AppendCharStringBuffer(converter->_buffer, '('); - QLJavascripterConvert(converter, lhs); - TRI_AppendStringStringBuffer(converter->_buffer, QLAstNodeGetBinaryOperatorString(node->_type)); - QLJavascripterConvert(converter, rhs); - TRI_AppendCharStringBuffer(converter->_buffer, ')'); - return; - case QLNodeContainerMemberAccess: - QLJavascripterConvert(converter, lhs); - QLJavascripterWalkList(converter, rhs, '.', 1); - return; - case QLNodeContainerTernarySwitch: - QLJavascripterConvert(converter, lhs); - TRI_AppendCharStringBuffer(converter->_buffer, ':'); - QLJavascripterConvert(converter, rhs); - return; - case QLNodeControlFunctionCall: - QLJavascripterConvert(converter, lhs); - TRI_AppendCharStringBuffer(converter->_buffer, '('); - QLJavascripterWalkList(converter, rhs, ',', 0); - TRI_AppendCharStringBuffer(converter->_buffer, ')'); - return; - case QLNodeControlTernary: - TRI_AppendCharStringBuffer(converter->_buffer, '('); - QLJavascripterConvert(converter, lhs); - TRI_AppendCharStringBuffer(converter->_buffer, '?'); - QLJavascripterConvert(converter, rhs); - TRI_AppendCharStringBuffer(converter->_buffer, ')'); - return; - default: - return; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create a javascript string by recursively walking an order by AST -//////////////////////////////////////////////////////////////////////////////// - -void QLJavascripterConvertOrder (QL_javascript_conversion_t *converter, QL_ast_node_t *node) { - QL_ast_node_t *lhs, *rhs, *start; - - if (node == 0) { - return; - } - - start = node; - while (node != 0) { - lhs = node->_lhs; - TRI_AppendStringStringBuffer(converter->_buffer, "lhs="); - converter->_prefix = "l"; - QLJavascripterConvert(converter, lhs); - TRI_AppendStringStringBuffer(converter->_buffer, ";rhs="); - converter->_prefix = "r"; - QLJavascripterConvert(converter, lhs); - - rhs = node->_rhs; - if (rhs->_value._boolValue) { - TRI_AppendStringStringBuffer(converter->_buffer, ";if(lhsrhs)return 1;"); - } - else { - TRI_AppendStringStringBuffer(converter->_buffer, ";if(lhsrhs)return -1;"); - } - if (node->_next == 0) { - break; - } - node = node->_next; - } - TRI_AppendStringStringBuffer(converter->_buffer, "return 0;"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: - diff --git a/QL/optimize.c b/QL/optimize.c index 4a58750627..e78910ebff 100644 --- a/QL/optimize.c +++ b/QL/optimize.c @@ -25,7 +25,6 @@ /// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#include "QL/ast-node.h" #include "QL/optimize.h" // ----------------------------------------------------------------------------- @@ -37,17 +36,16 @@ /// @{ //////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// /// @brief check whether a node is optimizable as an arithmetic operand //////////////////////////////////////////////////////////////////////////////// -bool QLOptimizeCanBeUsedAsArithmeticOperand (const QL_ast_node_t const *node) { +static bool QLOptimizeCanBeUsedAsArithmeticOperand (const TRI_query_node_t* const node) { switch (node->_type) { - case QLNodeValueNumberDouble: - case QLNodeValueNumberDoubleString: - case QLNodeValueBool: - case QLNodeValueNull: // NULL is equal to 0 in this case, i.e. NULL + 1 == 1, NULL -1 == -1 etc. + case TRI_QueryNodeValueNumberDouble: + case TRI_QueryNodeValueNumberDoubleString: + case TRI_QueryNodeValueBool: + case TRI_QueryNodeValueNull: // NULL is equal to 0 in this case, i.e. NULL + 1 == 1, NULL -1 == -1 etc. return true; default: return false; @@ -58,47 +56,45 @@ bool QLOptimizeCanBeUsedAsArithmeticOperand (const QL_ast_node_t const *node) { /// @brief check whether a node is optimizable as a relational operand //////////////////////////////////////////////////////////////////////////////// -bool QLOptimizeCanBeUsedAsRelationalOperand (const QL_ast_node_t const *node) { +static bool QLOptimizeCanBeUsedAsRelationalOperand (const TRI_query_node_t* const node) { switch (node->_type) { - case QLNodeValueNumberDouble: - case QLNodeValueNumberDoubleString: - case QLNodeValueBool: + case TRI_QueryNodeValueNumberDouble: + case TRI_QueryNodeValueNumberDoubleString: + case TRI_QueryNodeValueBool: return true; default: return false; } } - //////////////////////////////////////////////////////////////////////////////// /// @brief check whether a node is optimizable as a logical operand //////////////////////////////////////////////////////////////////////////////// -bool QLOptimizeCanBeUsedAsLogicalOperand (const QL_ast_node_t const *node) { +static bool QLOptimizeCanBeUsedAsLogicalOperand (const TRI_query_node_t* const node) { switch (node->_type) { - case QLNodeValueNumberDouble: - case QLNodeValueNumberDoubleString: - case QLNodeValueBool: - case QLNodeValueNull: + case TRI_QueryNodeValueNumberDouble: + case TRI_QueryNodeValueNumberDoubleString: + case TRI_QueryNodeValueBool: + case TRI_QueryNodeValueNull: return true; default: return false; } } - //////////////////////////////////////////////////////////////////////////////// /// @brief return a node value, converted to a bool //////////////////////////////////////////////////////////////////////////////// -bool QLOptimizeGetBool (const QL_ast_node_t const *node) { +static bool QLOptimizeGetBool (const TRI_query_node_t* const node) { double d; - if (node->_type == QLNodeValueNumberDouble) { + if (node->_type == TRI_QueryNodeValueNumberDouble) { return (node->_value._doubleValue != 0.0 ? true : false); } - if (node->_type == QLNodeValueNumberDoubleString) { + if (node->_type == TRI_QueryNodeValueNumberDoubleString) { d = TRI_DoubleString(node->_value._stringValue); if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { return true; @@ -106,130 +102,147 @@ bool QLOptimizeGetBool (const QL_ast_node_t const *node) { return (d != 0.0); } - if (node->_type == QLNodeValueNumberInt) { + if (node->_type == TRI_QueryNodeValueNumberInt) { return (node->_value._intValue != 0 ? true : false); } - if (node->_type == QLNodeValueBool) { + if (node->_type == TRI_QueryNodeValueBool) { return (node->_value._boolValue ? true : false); } - if (node->_type == QLNodeValueNull) { + if (node->_type == TRI_QueryNodeValueNull) { return false; } return false; } - //////////////////////////////////////////////////////////////////////////////// /// @brief return a node value, converted to a double //////////////////////////////////////////////////////////////////////////////// -double QLOptimizeGetDouble (const QL_ast_node_t const *node) { - if (node->_type == QLNodeValueNumberDouble) { +static double QLOptimizeGetDouble (const TRI_query_node_t* const node) { + if (node->_type == TRI_QueryNodeValueNumberDouble) { return node->_value._doubleValue; } - if (node->_type == QLNodeValueNumberDoubleString) { + if (node->_type == TRI_QueryNodeValueNumberDoubleString) { return TRI_DoubleString(node->_value._stringValue); } - if (node->_type == QLNodeValueNumberInt) { + if (node->_type == TRI_QueryNodeValueNumberInt) { return (double) node->_value._intValue; } - if (node->_type == QLNodeValueBool) { + if (node->_type == TRI_QueryNodeValueBool) { return (node->_value._boolValue ? 1.0 : 0.0); } - if (node->_type == QLNodeValueNull) { + if (node->_type == TRI_QueryNodeValueNull) { return 0.0; } return 0.0; } - //////////////////////////////////////////////////////////////////////////////// -/// @brief convert a node to a null value node +/// @brief check if a document declaration is static or dynamic //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeMakeValueNull (QL_ast_node_t *node) { - node->_type = QLNodeValueNull; - node->_lhs = 0; - node->_rhs = 0; +static bool QLOptimizeIsStaticDocument (const TRI_query_node_t* node) { + bool result; + + if (node->_next) { + while (node->_next) { + result = QLOptimizeIsStaticDocument(node->_next); + if (!result) { + return false; + } + node = node->_next; + } + return true; + } + + if (node->_lhs) { + result = QLOptimizeIsStaticDocument(node->_lhs); + if (!result) { + return false; + } + } + if (node->_rhs) { + result = QLOptimizeIsStaticDocument(node->_rhs); + if (!result) { + return false; + } + } + if (node->_type == TRI_QueryNodeReferenceCollectionAlias || + node->_type == TRI_QueryNodeControlFunctionCall || + node->_type == TRI_QueryNodeControlTernary || + node->_type == TRI_QueryNodeContainerMemberAccess) { + return false; + } + + return true; } - //////////////////////////////////////////////////////////////////////////////// /// @brief convert a node to a bool value node //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeMakeValueBool (QL_ast_node_t *node, bool value) { - node->_type = QLNodeValueBool; +static void QLOptimizeMakeValueBool (TRI_query_node_t* node, + const bool value) { + node->_type = TRI_QueryNodeValueBool; node->_value._boolValue = value; - node->_lhs = 0; - node->_rhs = 0; + node->_lhs = NULL; + node->_rhs = NULL; } - //////////////////////////////////////////////////////////////////////////////// /// @brief convert a node to a double value node //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeMakeValueNumberDouble (QL_ast_node_t *node, double value) { - node->_type = QLNodeValueNumberDouble; +static void QLOptimizeMakeValueNumberDouble (TRI_query_node_t* node, + const double value) { + node->_type = TRI_QueryNodeValueNumberDouble; node->_value._doubleValue = value; - node->_lhs = 0; - node->_rhs = 0; + node->_lhs = NULL; + node->_rhs = NULL; } - //////////////////////////////////////////////////////////////////////////////// /// @brief make a node a copy of another node //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeClone (QL_ast_node_t *target, QL_ast_node_t *source) { +static void QLOptimizeClone (TRI_query_node_t* target, + const TRI_query_node_t* const source) { target->_type = source->_type; target->_value = source->_value; target->_lhs = source->_lhs; target->_rhs = source->_rhs; } -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - - -// ----------------------------------------------------------------------------- -// --SECTION-- public functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////////////////////////// /// @brief optimization function for unary operators +/// +/// this function will optimize unary plus and unary minus operators that are +/// used together with constant values, e.g. it will merge the two nodes "-" and +/// "1" to a "-1". //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeUnaryOperator (QL_ast_node_t *node) { - QL_ast_node_t *lhs; - QL_ast_node_type_e type; +void QLOptimizeUnaryOperator (TRI_query_node_t* node) { + TRI_query_node_t* lhs; + TRI_query_node_type_e type; lhs = node->_lhs; - if (lhs == 0) { + if (!lhs) { // node has no child return; } type = node->_type; - if (type != QLNodeUnaryOperatorMinus && - type != QLNodeUnaryOperatorPlus && - type != QLNodeUnaryOperatorNot) { + if (type != TRI_QueryNodeUnaryOperatorMinus && + type != TRI_QueryNodeUnaryOperatorPlus && + type != TRI_QueryNodeUnaryOperatorNot) { return; } @@ -238,57 +251,57 @@ void QLOptimizeUnaryOperator (QL_ast_node_t *node) { return; } - if (type == QLNodeUnaryOperatorPlus) { + if (type == TRI_QueryNodeUnaryOperatorPlus) { // unary plus. This will make the result a numeric value QLOptimizeMakeValueNumberDouble(node, QLOptimizeGetDouble(lhs)); } - else if (type == QLNodeUnaryOperatorMinus) { + else if (type == TRI_QueryNodeUnaryOperatorMinus) { // unary minus. This will make the result a numeric value - node->_type = QLNodeValueNumberDouble; QLOptimizeMakeValueNumberDouble(node, 0.0 - QLOptimizeGetDouble(lhs)); } - else if (type == QLNodeUnaryOperatorNot) { + else if (type == TRI_QueryNodeUnaryOperatorNot) { + // logical ! QLOptimizeMakeValueBool(node, !QLOptimizeGetBool(lhs)); } } - //////////////////////////////////////////////////////////////////////////////// /// @brief optimize an arithmetic operation //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeArithmeticOperator (QL_ast_node_t *node) { +void QLOptimizeArithmeticOperator (TRI_query_node_t* node) { double lhsValue, rhsValue; - QL_ast_node_t *lhs, *rhs; - QL_ast_node_type_e type; + TRI_query_node_t *lhs, *rhs; + TRI_query_node_type_e type; type = node->_type; lhs = node->_lhs; rhs = node->_rhs; - if (QLOptimizeCanBeUsedAsArithmeticOperand(lhs) && QLOptimizeCanBeUsedAsArithmeticOperand(rhs)) { + if (QLOptimizeCanBeUsedAsArithmeticOperand(lhs) && + QLOptimizeCanBeUsedAsArithmeticOperand(rhs)) { // both operands are constants and can be merged into one result lhsValue = QLOptimizeGetDouble(lhs); rhsValue = QLOptimizeGetDouble(rhs); - if (type == QLNodeBinaryOperatorAdd) { + if (type == TRI_QueryNodeBinaryOperatorAdd) { // const + const ==> merge QLOptimizeMakeValueNumberDouble(node, lhsValue + rhsValue); } - else if (type == QLNodeBinaryOperatorSubtract) { + else if (type == TRI_QueryNodeBinaryOperatorSubtract) { // const - const ==> merge QLOptimizeMakeValueNumberDouble(node, lhsValue - rhsValue); } - else if (type == QLNodeBinaryOperatorMultiply) { + else if (type == TRI_QueryNodeBinaryOperatorMultiply) { // const * const ==> merge QLOptimizeMakeValueNumberDouble(node, lhsValue * rhsValue); } - else if (type == QLNodeBinaryOperatorDivide && rhsValue != 0.0) { + else if (type == TRI_QueryNodeBinaryOperatorDivide && rhsValue != 0.0) { // ignore division by zero. div0 will be handled in JS // const / const ==> merge QLOptimizeMakeValueNumberDouble(node, lhsValue / rhsValue); } - else if (type == QLNodeBinaryOperatorModulus && rhsValue != 0.0) { + else if (type == TRI_QueryNodeBinaryOperatorModulus && rhsValue != 0.0) { // ignore division by zero. div0 will be handled in JS // const % const ==> merge QLOptimizeMakeValueNumberDouble(node, fmod(lhsValue, rhsValue)); @@ -298,16 +311,16 @@ void QLOptimizeArithmeticOperator (QL_ast_node_t *node) { // only left operand is a constant lhsValue = QLOptimizeGetDouble(lhs); - if (type == QLNodeBinaryOperatorAdd && lhsValue == 0.0) { + if (type == TRI_QueryNodeBinaryOperatorAdd && lhsValue == 0.0) { // 0 + x ==> x // TODO: by adding 0, the result would become a double. Just copying over rhs is not enough! // QLOptimizeClone(node, rhs); } - else if (type == QLNodeBinaryOperatorMultiply && lhsValue == 0.0) { + else if (type == TRI_QueryNodeBinaryOperatorMultiply && lhsValue == 0.0) { // 0 * x ==> 0 QLOptimizeMakeValueNumberDouble(node, 0.0); } - else if (type == QLNodeBinaryOperatorMultiply && lhsValue == 1.0) { + else if (type == TRI_QueryNodeBinaryOperatorMultiply && lhsValue == 1.0) { // 1 * x ==> x // TODO: by adding 0, the result would become a double. Just copying over rhs is not enough! // QLOptimizeClone(node, rhs); @@ -317,21 +330,21 @@ void QLOptimizeArithmeticOperator (QL_ast_node_t *node) { // only right operand is a constant rhsValue = QLOptimizeGetDouble(rhs); - if (type == QLNodeBinaryOperatorAdd && rhsValue == 0.0) { + if (type == TRI_QueryNodeBinaryOperatorAdd && rhsValue == 0.0) { // x + 0 ==> x // TODO: by adding 0, the result would become a double. Just copying over lhs is not enough! QLOptimizeClone(node, lhs); } - else if (type == QLNodeBinaryOperatorSubtract && rhsValue == 0.0) { + else if (type == TRI_QueryNodeBinaryOperatorSubtract && rhsValue == 0.0) { // x - 0 ==> x // TODO: by adding 0, the result would become a double. Just copying over lhs is not enough! QLOptimizeClone(node, lhs); } - else if (type == QLNodeBinaryOperatorMultiply && rhsValue == 0.0) { + else if (type == TRI_QueryNodeBinaryOperatorMultiply && rhsValue == 0.0) { // x * 0 ==> 0 QLOptimizeMakeValueNumberDouble(node, 0.0); } - else if (type == QLNodeBinaryOperatorMultiply && rhsValue == 1.0) { + else if (type == TRI_QueryNodeBinaryOperatorMultiply && rhsValue == 1.0) { // x * 1 ==> x // TODO: by adding 0, the result would become a double. Just copying over lhs is not enough! QLOptimizeClone(node, lhs); @@ -339,28 +352,23 @@ void QLOptimizeArithmeticOperator (QL_ast_node_t *node) { } } - //////////////////////////////////////////////////////////////////////////////// /// @brief optimize a logical operation //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeLogicalOperator (QL_ast_node_t *node) { +void QLOptimizeLogicalOperator (TRI_query_node_t* node) { bool lhsValue; - QL_ast_node_t *lhs, *rhs; - QL_ast_node_type_e type; + TRI_query_node_t *lhs, *rhs; + TRI_query_node_type_e type; type = node->_type; lhs = node->_lhs; rhs = node->_rhs; - if (type == QLNodeBinaryOperatorAnd) { + if (type == TRI_QueryNodeBinaryOperatorAnd) { // logical and - if (lhs->_type == QLNodeValueNull) { - // NULL && r ==> NULL - QLOptimizeMakeValueNull(node); - } - else if (QLOptimizeCanBeUsedAsLogicalOperand(lhs)) { + if (QLOptimizeCanBeUsedAsLogicalOperand(lhs)) { lhsValue = QLOptimizeGetBool(lhs); if (lhsValue) { // true && r ==> r @@ -372,14 +380,10 @@ void QLOptimizeLogicalOperator (QL_ast_node_t *node) { } } } - else if (type == QLNodeBinaryOperatorOr) { + else if (type == TRI_QueryNodeBinaryOperatorOr) { // logical or - if (lhs->_type == QLNodeValueNull) { - // NULL || r ==> r - QLOptimizeClone(node, rhs); - } - else if (QLOptimizeCanBeUsedAsLogicalOperand(lhs)) { + if (QLOptimizeCanBeUsedAsLogicalOperand(lhs)) { lhsValue = QLOptimizeGetBool(lhs); if (lhsValue) { // true || r ==> true @@ -393,84 +397,187 @@ void QLOptimizeLogicalOperator (QL_ast_node_t *node) { } } +//////////////////////////////////////////////////////////////////////////////// +/// @brief optimize a constant string comparison +//////////////////////////////////////////////////////////////////////////////// + +static bool QLOptimizeStringComparison (TRI_query_node_t* node) { + TRI_query_node_t *lhs, *rhs; + TRI_query_node_type_e type; + int compareResult; + + lhs = node->_lhs; + rhs = node->_rhs; + + compareResult = strcmp(lhs->_value._stringValue, rhs->_value._stringValue); + type = node->_type; + + if (type == TRI_QueryNodeBinaryOperatorIdentical || type == TRI_QueryNodeBinaryOperatorEqual) { + QLOptimizeMakeValueBool(node, compareResult == 0); + return true; + } + if (type == TRI_QueryNodeBinaryOperatorUnidentical || type == TRI_QueryNodeBinaryOperatorUnequal) { + QLOptimizeMakeValueBool(node, compareResult != 0); + return true; + } + if (type == TRI_QueryNodeBinaryOperatorGreater) { + QLOptimizeMakeValueBool(node, compareResult > 0); + return true; + } + if (type == TRI_QueryNodeBinaryOperatorGreaterEqual) { + QLOptimizeMakeValueBool(node, compareResult >= 0); + return true; + } + if (type == TRI_QueryNodeBinaryOperatorLess) { + QLOptimizeMakeValueBool(node, compareResult < 0); + return true; + } + if (type == TRI_QueryNodeBinaryOperatorLessEqual) { + QLOptimizeMakeValueBool(node, compareResult <= 0); + return true; + } + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief optimize a member comparison +//////////////////////////////////////////////////////////////////////////////// + +static bool QLOptimizeMemberComparison (TRI_query_node_t* node) { + TRI_query_node_t *lhs, *rhs; + TRI_query_node_type_e type; + bool isSameMember; + + lhs = node->_lhs; + rhs = node->_rhs; + type = node->_type; + + isSameMember = (QLAstQueryGetMemberNameHash(lhs) == QLAstQueryGetMemberNameHash(rhs)); + if (isSameMember) { + if (type == TRI_QueryNodeBinaryOperatorIdentical || + type == TRI_QueryNodeBinaryOperatorEqual || + type == TRI_QueryNodeBinaryOperatorGreaterEqual || + type == TRI_QueryNodeBinaryOperatorLessEqual) { + QLOptimizeMakeValueBool(node, true); + return true; + } + if (type == TRI_QueryNodeBinaryOperatorUnidentical || + type == TRI_QueryNodeBinaryOperatorUnequal || + type == TRI_QueryNodeBinaryOperatorGreater || + type == TRI_QueryNodeBinaryOperatorLess) { + QLOptimizeMakeValueBool(node, false); + return true; + } + } + + // caller function must handle this + return false; +} //////////////////////////////////////////////////////////////////////////////// /// @brief optimize a relational operation //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeRelationalOperator (QL_ast_node_t *node) { +void QLOptimizeRelationalOperator (TRI_query_node_t* node) { double lhsValue, rhsValue; - QL_ast_node_t *lhs, *rhs; - QL_ast_node_type_e type; - - type = node->_type; + TRI_query_node_t *lhs, *rhs; + TRI_query_node_type_e type; + lhs = node->_lhs; rhs = node->_rhs; + type = node->_type; - if (QLOptimizeCanBeUsedAsRelationalOperand(lhs) && QLOptimizeCanBeUsedAsRelationalOperand(rhs)) { + if (lhs->_type == TRI_QueryNodeValueString && rhs->_type == TRI_QueryNodeValueString) { + // both operands are constant strings + if (QLOptimizeStringComparison(node)) { + return; + } + } + + if (lhs->_type == TRI_QueryNodeContainerMemberAccess && + rhs->_type == TRI_QueryNodeContainerMemberAccess) { + // both operands are collections members (document properties) + if (QLOptimizeMemberComparison(node)) { + return; + } + } + + if (QLOptimizeCanBeUsedAsRelationalOperand(lhs) && + QLOptimizeCanBeUsedAsRelationalOperand(rhs)) { // both operands are constants and can be merged into one result lhsValue = QLOptimizeGetDouble(lhs); rhsValue = QLOptimizeGetDouble(rhs); - if (type == QLNodeBinaryOperatorIdentical) { + if (type == TRI_QueryNodeBinaryOperatorIdentical) { QLOptimizeMakeValueBool(node, (lhsValue == rhsValue) && (lhs->_type == rhs->_type)); } - else if (type == QLNodeBinaryOperatorUnidentical) { + else if (type == TRI_QueryNodeBinaryOperatorUnidentical) { QLOptimizeMakeValueBool(node, (lhsValue != rhsValue) || (lhs->_type != rhs->_type)); } - else if (type == QLNodeBinaryOperatorEqual) { + else if (type == TRI_QueryNodeBinaryOperatorEqual) { QLOptimizeMakeValueBool(node, lhsValue == rhsValue); } - else if (type == QLNodeBinaryOperatorUnequal) { + else if (type == TRI_QueryNodeBinaryOperatorUnequal) { QLOptimizeMakeValueBool(node, lhsValue != rhsValue); } - else if (type == QLNodeBinaryOperatorLess) { + else if (type == TRI_QueryNodeBinaryOperatorLess) { QLOptimizeMakeValueBool(node, lhsValue < rhsValue); } - else if (type == QLNodeBinaryOperatorGreater) { + else if (type == TRI_QueryNodeBinaryOperatorGreater) { QLOptimizeMakeValueBool(node, lhsValue > rhsValue); } - else if (type == QLNodeBinaryOperatorLessEqual) { + else if (type == TRI_QueryNodeBinaryOperatorLessEqual) { QLOptimizeMakeValueBool(node, lhsValue <= rhsValue); } - else if (type == QLNodeBinaryOperatorGreaterEqual) { + else if (type == TRI_QueryNodeBinaryOperatorGreaterEqual) { QLOptimizeMakeValueBool(node, lhsValue >= rhsValue); } } } - //////////////////////////////////////////////////////////////////////////////// /// @brief optimization function for binary operators +/// +/// this function will optimize arithmetic, relational and logical operators +/// that are used together with constant values. It will replace the binary +/// operator with the result of the optimization. +/// The node will therefore change its type from a binary operator to a value +/// type node. The former sub nodes (lhs and rhs) of the binary operator will +/// be unlinked, but not be freed here. +/// Freeing memory is done later when the whole query structure is deallocated. //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeBinaryOperator (QL_ast_node_t *node) { - if (QLAstNodeIsArithmeticOperator(node)) { +void QLOptimizeBinaryOperator (TRI_query_node_t* node) { + if (TRI_QueryNodeIsArithmeticOperator(node)) { // optimize arithmetic operation QLOptimizeArithmeticOperator(node); } - else if (QLAstNodeIsLogicalOperator(node)) { + else if (TRI_QueryNodeIsLogicalOperator(node)) { // optimize logical operation QLOptimizeLogicalOperator(node); } - else if (QLAstNodeIsRelationalOperator(node)) { - // optimize relational operation + else if (TRI_QueryNodeIsRelationalOperator(node)) { + // optimize relational operation QLOptimizeRelationalOperator(node); } } - //////////////////////////////////////////////////////////////////////////////// /// @brief optimization function for the ternary operator +/// +/// this function will optimize the ternary operator if the conditional part is +/// reducible to a constant. It will substitute the condition with the true +/// part if the condition is true, and with the false part if the condition is +/// false. //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeTernaryOperator (QL_ast_node_t *node) { - QL_ast_node_t *lhs, *rhs; +void QLOptimizeTernaryOperator (TRI_query_node_t* node) { + TRI_query_node_t *lhs, *rhs; bool lhsValue; // condition part lhs = node->_lhs; - + if (QLOptimizeCanBeUsedAsLogicalOperand(lhs)) { lhsValue = QLOptimizeGetBool(lhs); // true and false parts @@ -484,40 +591,50 @@ void QLOptimizeTernaryOperator (QL_ast_node_t *node) { } } +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @brief recursively optimize order by +/// @brief optimize order by by removing constant parts //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeOrder (QL_ast_node_t *node) { - QL_ast_node_t *next; - - next = node->_next; - while (next != 0) { +void QLOptimizeOrder (TRI_query_node_t* node) { + TRI_query_node_t* responsibleNode; + + responsibleNode = node; + node = node->_next; + while (node) { // lhs contains the order expression, rhs contains the sort order - QLOptimizeExpression(next->_lhs); - next = next->_next; + QLOptimizeExpression(node->_lhs); + if (TRI_QueryNodeIsBooleanizable(node->_lhs)) { + // skip constant parts in order by + responsibleNode->_next = node->_next; + } + else { + responsibleNode = node; + } + node = node->_next; } } - //////////////////////////////////////////////////////////////////////////////// /// @brief recursively optimize nodes in an expression AST //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeExpression (QL_ast_node_t *node) { - QL_ast_node_type_e type; - QL_ast_node_t *lhs, *rhs, *next; +void QLOptimizeExpression (TRI_query_node_t* node) { + TRI_query_node_type_e type; + TRI_query_node_t *lhs, *rhs, *next; - if (node == 0) { + if (!node) { return; } - + type = node->_type; - if (type == QLNodeContainerList) { + if (type == TRI_QueryNodeContainerList) { next = node->_next; while (next) { - if (!QLAstNodeIsValueNode(node)) { + if (!TRI_QueryNodeIsValueNode(node)) { // no need to optimize value nodes QLOptimizeExpression(next); } @@ -525,48 +642,939 @@ void QLOptimizeExpression (QL_ast_node_t *node) { } } - if (QLAstNodeIsValueNode(node)) { + if (TRI_QueryNodeIsValueNode(node)) { // exit early, no need to optimize value nodes return; } lhs = node->_lhs; - if (lhs != 0) { + if (lhs) { QLOptimizeExpression(lhs); } rhs = node->_rhs; - if (rhs != 0) { + if (rhs) { QLOptimizeExpression(rhs); } - if (QLAstNodeIsUnaryOperator(node)) { + if (TRI_QueryNodeIsUnaryOperator(node)) { QLOptimizeUnaryOperator(node); } - else if (QLAstNodeIsBinaryOperator(node)) { + else if (TRI_QueryNodeIsBinaryOperator(node)) { QLOptimizeBinaryOperator(node); } - else if (QLAstNodeIsTernaryOperator(node)) { + else if (TRI_QueryNodeIsTernaryOperator(node)) { QLOptimizeTernaryOperator(node); } } +//////////////////////////////////////////////////////////////////////////////// +/// @brief Reference count all collections in an AST part by walking it +/// recursively +/// +/// For each found collection, the counter value will be increased by one. +/// Reference counting is necessary to detect which collections in the from +/// clause are not used in the select, where and order by operations. Unused +/// collections that are left or list join'd can be removed. +//////////////////////////////////////////////////////////////////////////////// + +//static void QLOptimizeRefCountCollections (const QL_parser_context_t* context, +static void QLOptimizeRefCountCollections (TRI_query_template_t* const template_, + const TRI_query_node_t* node) { + TRI_query_node_t *lhs, *rhs, *next; + + if (!node) { + return; + } + + if (node->_type == TRI_QueryNodeContainerList) { + next = node->_next; + while (next) { + QLOptimizeRefCountCollections(template_, next); + next = next->_next; + } + } + + if (node->_type == TRI_QueryNodeReferenceCollectionAlias) { + QLAstQueryAddRefCount(template_->_query, node->_value._stringValue); + } + + lhs = node->_lhs; + if (lhs) { + QLOptimizeRefCountCollections(template_, lhs); + } + + rhs = node->_rhs; + if (rhs) { + QLOptimizeRefCountCollections(template_, rhs); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Reference count all used collections in a query +/// +/// Reference counting is later used to remove unnecessary joins +//////////////////////////////////////////////////////////////////////////////// + +//static void QLOptimizeCountRefs (const QL_parser_context_t* context) { +static void QLOptimizeCountRefs (TRI_query_template_t* const template_) { + TRI_query_node_t* next = NULL; + TRI_query_node_t* node = (TRI_query_node_t*) template_->_query->_from._base; + TRI_query_node_t* alias; + + if (template_->_query->_from._collections._nrUsed < 2) { + // we don't have a join, no need to refcount anything + return; + } + + // mark collections used in select, where and order + QLOptimizeRefCountCollections(template_, template_->_query->_select._base); + QLOptimizeRefCountCollections(template_, template_->_query->_where._base); + QLOptimizeRefCountCollections(template_, template_->_query->_order._base); + + // mark collections used in on clauses + node = node->_next; + while (node) { + next = node->_next; + if (next) { + break; + } + + alias = (TRI_query_node_t*) ((TRI_query_node_t*) next->_lhs)->_rhs; + if ((QLAstQueryGetRefCount(template_->_query, alias->_value._stringValue) > 0) || + (next->_type == TRI_QueryNodeJoinInner)) { + QLOptimizeRefCountCollections(template_, next->_rhs); + } + node = node->_next; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief optimize from/joins +//////////////////////////////////////////////////////////////////////////////// + +void QLOptimizeFrom (TRI_query_template_t* const template_) { + TRI_query_node_t* temp; + TRI_query_node_t* alias; + TRI_query_node_t* responsibleNode; + TRI_query_node_t* next = NULL; + TRI_query_node_t* node = (TRI_query_node_t*) template_->_query->_from._base; + + // count usages of collections in select, where and order clause + QLOptimizeCountRefs(template_); + + responsibleNode = node; + node = node->_next; + + // iterate over all joins + while (node) { + if (node->_rhs) { + // optimize on clause + QLOptimizeExpression(node->_rhs); + if (node->_type == TRI_QueryNodeJoinInner && + QLOptimizeGetWhereType(node->_rhs) == QLQueryWhereTypeAlwaysFalse) { + // inner join condition is always false, query will have no results + // TODO: set marker that query is empty + } + } + next = node->_next; + if (!next) { + break; + } + + assert(next->_lhs); + + alias = (TRI_query_node_t*) ((TRI_query_node_t*) next->_lhs)->_rhs; + if ((QLAstQueryGetRefCount(template_->_query, alias->_value._stringValue) < 1) && + (next->_type == TRI_QueryNodeJoinLeft || + next->_type == TRI_QueryNodeJoinRight || + next->_type == TRI_QueryNodeJoinList)) { + // collection is joined but unused in select, where, order clause + // remove unused list or outer joined collections + // move joined collection one up + node->_next = next->_next; + // continue at the same position as the new collection at the current + // position might also be removed if it is useless + continue; + } + + if (next->_type == TRI_QueryNodeJoinRight) { + // convert a right join into a left join + next->_type = TRI_QueryNodeJoinLeft; + temp = next->_lhs; + node->_next = NULL; + next->_lhs = node; + temp->_next = next; + responsibleNode->_next = temp; + node = temp; + } + + responsibleNode = node; + node = node->_next; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Find a specific range in a range vector +/// +/// The value is looked up using its hash value. A value of 0 will be returned +/// to indicate the range is not contained in the vector. Otherwise, a value +/// of >= 1 will be returned that indicates the range's position in the vector. +//////////////////////////////////////////////////////////////////////////////// + +static QL_optimize_range_t* QLOptimizeGetRangeByHash (const uint64_t hash, + TRI_vector_pointer_t* ranges) { + QL_optimize_range_t* range; + size_t i; + + assert(ranges); + + for (i = 0; i < ranges->_length; i++) { + range = (QL_optimize_range_t*) ranges->_buffer[i]; + if (range && range->_hash == hash) { + return range; + } + } + + // range is not contained in the vector + return NULL; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free all existing ranges in a range vector +//////////////////////////////////////////////////////////////////////////////// + +void QLOptimizeFreeRangeVector (TRI_vector_pointer_t* vector) { + QL_optimize_range_t* range; + size_t i; + + for (i = 0; i < vector->_length; i++) { + range = (QL_optimize_range_t*) vector->_buffer[i]; + if (!range) { + continue; + } + + if (range->_collection) { + TRI_Free(range->_collection); + } + + if (range->_field) { + TRI_Free(range->_field); + } + + if (range->_refValue._collection) { + TRI_FreeString(range->_refValue._collection); + } + + if (range->_refValue._field) { + TRI_FreeString(range->_refValue._field); + } + + if (range->_valueType == RANGE_TYPE_JSON) { + // minValue and maxValue point to the same string, just free it once! + TRI_FreeString(range->_minValue._stringValue); + } + + if (range->_valueType == RANGE_TYPE_STRING) { + if (range->_minValue._stringValue) { + TRI_FreeString(range->_minValue._stringValue); + } + if (range->_maxValue._stringValue) { + TRI_FreeString(range->_maxValue._stringValue); + } + } + + TRI_Free(range); + } + + TRI_DestroyVectorPointer(vector); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Combine multiple ranges into less ranges if possible +/// +/// Multiple ranges for the same field will be merged into one range if +/// possible. Definitely senseless ranges will be removed and replaced by (bool) +/// false values. They can then be removed later by further expression +/// optimization. +//////////////////////////////////////////////////////////////////////////////// + +static TRI_vector_pointer_t* QLOptimizeCombineRanges (const TRI_query_node_type_e type, + TRI_query_node_t* node, + TRI_vector_pointer_t* ranges) { + TRI_vector_pointer_t* vector; + QL_optimize_range_t* range; + QL_optimize_range_t* previous; + size_t i; + int compareResult; + + vector = (TRI_vector_pointer_t*) TRI_Allocate(sizeof(TRI_vector_pointer_t)); + if (!vector) { + return NULL; + } + + TRI_InitVectorPointer(vector); + + for (i = 0; i < ranges->_length; i++) { + range = (QL_optimize_range_t*) ranges->_buffer[i]; + + if (!range) { + if (type == TRI_QueryNodeBinaryOperatorAnd) { + goto INVALIDATE_NODE; + } + + continue; + } + + assert(range); + + if (type == TRI_QueryNodeBinaryOperatorAnd) { + if (range->_minStatus == RANGE_VALUE_INFINITE && + range->_maxStatus == RANGE_VALUE_INFINITE) { + // ignore !== and != operators in logical && + continue; + } + } + + + previous = QLOptimizeGetRangeByHash(range->_hash, vector); + if (type == TRI_QueryNodeBinaryOperatorOr) { + // only use logical || operator for same field. if field name differs, an || + // effectively kills all ranges + if (vector->_length >0 && !previous) { + QLOptimizeFreeRangeVector(vector); + TRI_InitVectorPointer(vector); + goto EXIT; + } + } + + if (!previous) { + // push range into result vector + TRI_PushBackVectorPointer(vector, range); + + // remove range from original vector to avoid double freeing + ranges->_buffer[i] = NULL; + continue; + } + + if (type == TRI_QueryNodeBinaryOperatorOr) { + // logical || operator + if (range->_minStatus == RANGE_VALUE_INFINITE && + range->_maxStatus == RANGE_VALUE_INFINITE) { + // !== and != operators in an || always set result range to infinite + previous->_minStatus = range->_minStatus; + previous->_maxStatus = range->_maxStatus; + continue; + } + if ((previous->_maxStatus == RANGE_VALUE_INFINITE && + range->_minStatus == RANGE_VALUE_INFINITE) || + (previous->_minStatus == RANGE_VALUE_INFINITE && + range->_maxStatus == RANGE_VALUE_INFINITE)) { + previous->_minStatus = RANGE_VALUE_INFINITE; + previous->_maxStatus = RANGE_VALUE_INFINITE; + continue; + } + + if (previous->_valueType != range->_valueType) { + // The two ranges have different data types. + // Thus set result range to infinite because we cannot merge these ranges + previous->_minStatus = RANGE_VALUE_INFINITE; + previous->_maxStatus = RANGE_VALUE_INFINITE; + continue; + } + + if (previous->_valueType == RANGE_TYPE_DOUBLE) { + // combine two double ranges + if (previous->_minStatus != RANGE_VALUE_INFINITE && + range->_minStatus != RANGE_VALUE_INFINITE) { + if (range->_minValue._doubleValue <= previous->_minValue._doubleValue) { + // adjust lower bound + if (range->_minValue._doubleValue == previous->_minValue._doubleValue) { + if (previous->_minStatus == RANGE_VALUE_INCLUDED || + range->_minStatus == RANGE_VALUE_INCLUDED) { + previous->_minStatus = RANGE_VALUE_INCLUDED; + } + else { + previous->_minStatus = RANGE_VALUE_EXCLUDED; + } + } + else { + previous->_minStatus = range->_minStatus; + } + previous->_minValue._doubleValue = range->_minValue._doubleValue; + } + } + if (previous->_maxStatus != RANGE_VALUE_INFINITE && + range->_maxStatus != RANGE_VALUE_INFINITE) { + if (range->_maxValue._doubleValue >= previous->_maxValue._doubleValue) { + // adjust upper bound + if (range->_maxValue._doubleValue == previous->_maxValue._doubleValue) { + if (previous->_maxStatus == RANGE_VALUE_INCLUDED || + range->_maxStatus == RANGE_VALUE_INCLUDED) { + previous->_maxStatus = RANGE_VALUE_INCLUDED; + } + else { + previous->_maxStatus = RANGE_VALUE_EXCLUDED; + } + } + else { + previous->_maxStatus = range->_maxStatus; + } + previous->_maxValue._doubleValue = range->_maxValue._doubleValue; + } + } + } + else if (previous->_valueType == RANGE_TYPE_STRING) { + // combine two string ranges + if (previous->_minStatus != RANGE_VALUE_INFINITE && + range->_minStatus != RANGE_VALUE_INFINITE) { + compareResult = strcmp(range->_minValue._stringValue, + previous->_minValue._stringValue); + if (compareResult <= 0) { + // adjust lower bound + if (compareResult == 0) { + if (previous->_minStatus == RANGE_VALUE_INCLUDED || + range->_minStatus == RANGE_VALUE_INCLUDED) { + previous->_minStatus = RANGE_VALUE_INCLUDED; + } + else { + previous->_minStatus = RANGE_VALUE_EXCLUDED; + } + } + else { + previous->_minStatus = range->_minStatus; + } + + if (compareResult == 0) { + if (previous->_minStatus == RANGE_VALUE_INCLUDED || + range->_minStatus == RANGE_VALUE_INCLUDED) { + previous->_minStatus = RANGE_VALUE_INCLUDED; + } + else { + previous->_minStatus = RANGE_VALUE_EXCLUDED; + } + } + else { + previous->_minStatus = range->_minStatus; + } + previous->_minValue._stringValue = range->_minValue._stringValue; + } + } + if (previous->_maxStatus != RANGE_VALUE_INFINITE && + range->_maxStatus != RANGE_VALUE_INFINITE) { + compareResult = strcmp(range->_maxValue._stringValue, + previous->_maxValue._stringValue); + if (compareResult >= 0) { + // adjust upper bound + if (compareResult == 0) { + if (previous->_maxStatus == RANGE_VALUE_INCLUDED || + range->_maxStatus == RANGE_VALUE_INCLUDED) { + previous->_maxStatus = RANGE_VALUE_INCLUDED; + } + else { + previous->_maxStatus = RANGE_VALUE_EXCLUDED; + } + } + else { + previous->_maxStatus = range->_maxStatus; + } + previous->_maxValue._stringValue = range->_maxValue._stringValue; + } + } + } + } + else { + // logical && operator + if (previous->_valueType != range->_valueType) { + // ranges have different data types. set result range to infinite + previous->_minStatus = RANGE_VALUE_INFINITE; + previous->_maxStatus = RANGE_VALUE_INFINITE; + continue; + } + + if (previous->_valueType == RANGE_TYPE_DOUBLE) { + // combine two double ranges + if (previous->_minStatus != RANGE_VALUE_INFINITE && + range->_maxStatus != RANGE_VALUE_INFINITE) { + if (range->_maxValue._doubleValue < previous->_minValue._doubleValue || + (range->_maxValue._doubleValue <= previous->_minValue._doubleValue && + previous->_minStatus == RANGE_VALUE_EXCLUDED)) { + // new upper bound is lower than previous lower bound => empty range + // old: | | + // new: | | + goto INVALIDATE_NODE; + } + } + if (previous->_maxStatus != RANGE_VALUE_INFINITE && + range->_minStatus != RANGE_VALUE_INFINITE) { + if (range->_minValue._doubleValue < previous->_maxValue._doubleValue || + (range->_minValue._doubleValue <= previous->_maxValue._doubleValue && + previous->_maxStatus == RANGE_VALUE_EXCLUDED)) { + // new lower bound is higher than previous upper bound => empty range + // old: | | + // new: | | + goto INVALIDATE_NODE; + } + } + + if (previous->_minStatus != RANGE_VALUE_INFINITE) { + if (range->_minStatus == RANGE_VALUE_INFINITE || + previous->_minValue._doubleValue > range->_minValue._doubleValue) { + // adjust lower bound + range->_minValue._doubleValue = previous->_minValue._doubleValue; + range->_minStatus = previous->_minStatus; + } + } + if (previous->_maxStatus != RANGE_VALUE_INFINITE) { + if (range->_maxStatus == RANGE_VALUE_INFINITE || + previous->_maxValue._doubleValue < range->_maxValue._doubleValue) { + // adjust upper bound + range->_maxValue._doubleValue = previous->_maxValue._doubleValue; + range->_maxStatus = previous->_maxStatus; + } + } + + if (range->_minStatus != RANGE_VALUE_INFINITE && + range->_maxStatus != RANGE_VALUE_INFINITE) { + if (range->_minValue._doubleValue > range->_maxValue._doubleValue) { + goto INVALIDATE_NODE; + } + } + + previous->_minValue._doubleValue = range->_minValue._doubleValue; + previous->_maxValue._doubleValue = range->_maxValue._doubleValue; + previous->_minStatus = range->_minStatus; + previous->_maxStatus = range->_maxStatus; + } + else if (previous->_valueType == RANGE_TYPE_STRING) { + // combine two string ranges + if (previous->_minStatus != RANGE_VALUE_INFINITE && + range->_maxStatus != RANGE_VALUE_INFINITE) { + compareResult = strcmp(range->_maxValue._stringValue, + previous->_minValue._stringValue); + if (compareResult < 0 || + (compareResult <= 0 && previous->_minStatus == RANGE_VALUE_EXCLUDED)) { + // new upper bound is lower than previous lower bound => empty range + // old: | | + // new: | | + goto INVALIDATE_NODE; + } + } + if (previous->_maxStatus != RANGE_VALUE_INFINITE && + range->_minStatus != RANGE_VALUE_INFINITE) { + compareResult = strcmp(range->_minValue._stringValue, + previous->_maxValue._stringValue); + if (compareResult < 0 || + (compareResult <= 0 && previous->_maxStatus == RANGE_VALUE_EXCLUDED)) { + // new lower bound is higher than previous upper bound => empty range + // old: | | + // new: | | + goto INVALIDATE_NODE; + } + } + + if (previous->_minStatus != RANGE_VALUE_INFINITE) { + if (range->_minStatus == RANGE_VALUE_INFINITE) { + compareResult = 1; + } + else { + compareResult = strcmp(previous->_minValue._stringValue, + range->_minValue._stringValue); + } + if (range->_minStatus == RANGE_VALUE_INFINITE || compareResult > 0) { + // adjust lower bound + range->_minValue._stringValue = previous->_minValue._stringValue; + range->_minStatus = previous->_minStatus; + } + } + if (previous->_maxStatus != RANGE_VALUE_INFINITE) { + if (range->_maxStatus == RANGE_VALUE_INFINITE) { + compareResult = -1; + } + else { + compareResult = strcmp(previous->_maxValue._stringValue, + range->_maxValue._stringValue); + } + if (range->_maxStatus == RANGE_VALUE_INFINITE || compareResult < 0) { + // adjust upper bound + range->_maxValue._stringValue = previous->_maxValue._stringValue; + range->_maxStatus = previous->_maxStatus; + } + } + + if (range->_minStatus != RANGE_VALUE_INFINITE && + range->_maxStatus != RANGE_VALUE_INFINITE) { + compareResult = strcmp(range->_minValue._stringValue, + range->_maxValue._stringValue); + if (compareResult > 0) { + goto INVALIDATE_NODE; + } + } + + previous->_minValue._stringValue = range->_minValue._stringValue; + previous->_maxValue._stringValue = range->_maxValue._stringValue; + previous->_minStatus = range->_minStatus; + previous->_maxStatus = range->_maxStatus; + + } + } + } + + goto EXIT; + + +INVALIDATE_NODE: + QLOptimizeMakeValueBool(node, false); + QLOptimizeFreeRangeVector(vector); + TRI_InitVectorPointer(vector); + // push nil pointer to indicate range is invalid + TRI_PushBackVectorPointer(vector, NULL); + +EXIT: + QLOptimizeFreeRangeVector(ranges); + TRI_Free(ranges); + + return vector; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Merge two range vectors into one +//////////////////////////////////////////////////////////////////////////////// + +static TRI_vector_pointer_t* QLOptimizeMergeRangeVectors (TRI_vector_pointer_t* left, + TRI_vector_pointer_t* right) { + size_t i; + + if (!left && !right) { + // both vectors invalid => nothing to do + return NULL; + } + if (left && !right) { + // left vector is valid, right is not => return left vector + return left; + } + if (!left && right) { + // right vector is valid, left is not => return right vector + return right; + } + + // both vectors are valid, move elements from right vector into left one + for (i = 0; i < right->_length; i++) { + TRI_PushBackVectorPointer(left, right->_buffer[i]); + } + + TRI_DestroyVectorPointer(right); + TRI_Free(right); + + return left; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create a vector for ranges with one initial element +//////////////////////////////////////////////////////////////////////////////// + +static TRI_vector_pointer_t* QLOptimizeCreateRangeVector (QL_optimize_range_t* range) { + TRI_vector_pointer_t* vector; + + if (!range) { + return NULL; + } + + vector = (TRI_vector_pointer_t*) TRI_Allocate(sizeof(TRI_vector_pointer_t)); + if (!vector) { + return NULL; + } + + TRI_PushBackVectorPointer(vector, range); + return vector; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create a value range from a name, relop, value combination +/// +/// This function is called for each (name relop value) combination found. +/// The range will get a type matching the data type for the comparison. +/// Currently supported data types are doubles and strings. +/// The range will have a lower and an upper bound (minValue and maxValue), both +/// of which can be infinite. +/// +/// The ranges will be composed as follows: +/// +/// Comparison type I/E Lower value Upper value I/E +/// ----------------------------------------------------------------------------- +/// - equality (field == value) I value value I +/// - unequality (field != value) - -inf +inf - +/// - greater (field > value) E value +inf - +/// - greater eq (field >= value) I value +inf - +/// - less (field < value) - -inf value E +/// - less eq (field <= value) - -inf value I +/// +/// "I" means that the value itself is included in the range. +/// "E" means that the value itself is excluded from the range. +/// "-" means "not relevant" +/// +/// The ranges created are used later to combined for logical && and || +/// operations and reduced to simpler or impossible ranges if possible. +//////////////////////////////////////////////////////////////////////////////// + +static QL_optimize_range_t* QLOptimizeCreateRange (TRI_query_node_t* memberNode, + TRI_query_node_t* valueNode, + const TRI_query_node_type_e type) { + QL_optimize_range_t* range; + TRI_string_buffer_t* name; + TRI_query_node_t* lhs; + TRI_query_javascript_converter_t* documentJs; + + // get the field name + name = QLAstQueryGetMemberNameString(memberNode, false); + if (!name) { + return NULL; + } + + range = (QL_optimize_range_t*) TRI_Allocate(sizeof(QL_optimize_range_t)); + if (!range) { + // clean up + TRI_FreeStringBuffer(name); + TRI_Free(name); + return NULL; + } + + range->_collection = NULL; + range->_field = NULL; + range->_refValue._field = NULL; + range->_refValue._collection = NULL; + + // get value + if (valueNode->_type == TRI_QueryNodeValueNumberDouble || + valueNode->_type == TRI_QueryNodeValueNumberDoubleString) { + // range is of type double + range->_valueType = RANGE_TYPE_DOUBLE; + } + else if (valueNode->_type == TRI_QueryNodeValueString) { + // range is of type string + range->_valueType = RANGE_TYPE_STRING; + } + else if (valueNode->_type == TRI_QueryNodeValueDocument || + valueNode->_type == TRI_QueryNodeValueArray) { + range->_valueType = RANGE_TYPE_JSON; + } + else if (valueNode->_type == TRI_QueryNodeContainerMemberAccess) { + range->_valueType = RANGE_TYPE_FIELD; + } + else { + assert(false); + } + + // store collection, field name and hash + lhs = memberNode->_lhs; + range->_collection = TRI_DuplicateString(lhs->_value._stringValue); + range->_field = TRI_DuplicateString(name->_buffer); + range->_hash = QLAstQueryGetMemberNameHash(memberNode); + + // we can now free the temporary name buffer + TRI_FreeStringBuffer(name); + TRI_Free(name); + + if (type == TRI_QueryNodeBinaryOperatorIdentical || + type == TRI_QueryNodeBinaryOperatorEqual) { + // === and == , range is [ value (inc) ... value (inc) ] + if (range->_valueType == RANGE_TYPE_FIELD) { + range->_refValue._collection = TRI_DuplicateString( + ((TRI_query_node_t*) valueNode->_lhs)->_value._stringValue); + name = QLAstQueryGetMemberNameString(valueNode, false); + if (name) { + range->_refValue._field = TRI_DuplicateString(name->_buffer); + TRI_FreeStringBuffer(name); + TRI_Free(name); + } + } + else if (range->_valueType == RANGE_TYPE_DOUBLE) { + range->_minValue._doubleValue = QLOptimizeGetDouble(valueNode); + range->_maxValue._doubleValue = range->_minValue._doubleValue; + } + else if (range->_valueType == RANGE_TYPE_STRING) { + range->_minValue._stringValue = TRI_DuplicateString(valueNode->_value._stringValue); + range->_maxValue._stringValue = range->_minValue._stringValue; + } + else if (range->_valueType == RANGE_TYPE_JSON) { + documentJs = TRI_InitQueryJavascript(); + if (!documentJs) { + TRI_FreeStringBuffer(name); + TRI_Free(name); + TRI_Free(range); + return NULL; + } + TRI_ConvertQueryJavascript(documentJs, valueNode); + range->_minValue._stringValue = TRI_DuplicateString(documentJs->_buffer->_buffer); + range->_maxValue._stringValue = range->_minValue._stringValue; + TRI_FreeQueryJavascript(documentJs); + if (!range->_minValue._stringValue) { + TRI_FreeStringBuffer(name); + TRI_Free(name); + TRI_Free(range); + return NULL; + } + } + range->_minStatus = RANGE_VALUE_INCLUDED; + range->_maxStatus = RANGE_VALUE_INCLUDED; + } + else if (type == TRI_QueryNodeBinaryOperatorUnidentical || + type == TRI_QueryNodeBinaryOperatorUnequal) { + // !== and != , range is [ -inf ... +inf ] + range->_minStatus = RANGE_VALUE_INFINITE; + range->_maxStatus = RANGE_VALUE_INFINITE; + } + else if (type == TRI_QueryNodeBinaryOperatorGreaterEqual || + type == TRI_QueryNodeBinaryOperatorGreater) { + // >= and > , range is [ value ... +inf ] + if (range->_valueType == RANGE_TYPE_DOUBLE) { + range->_minValue._doubleValue = QLOptimizeGetDouble(valueNode); + } + else if (range->_valueType == RANGE_TYPE_STRING) { + range->_minValue._stringValue = TRI_DuplicateString(valueNode->_value._stringValue); + } + + if (type == TRI_QueryNodeBinaryOperatorGreaterEqual) { + // value is included (>=), range is [ value (inc) ... +inf ] + range->_minStatus = RANGE_VALUE_INCLUDED; + } + else { + // value is excluded (>), range is [ value (enc) ... +inf ] + range->_minStatus = RANGE_VALUE_EXCLUDED; + } + range->_maxStatus = RANGE_VALUE_INFINITE; + } + else if (type == TRI_QueryNodeBinaryOperatorLessEqual || + type == TRI_QueryNodeBinaryOperatorLess) { + // <= and < , range is [ -inf ... value ] + if (range->_valueType == RANGE_TYPE_DOUBLE) { + range->_maxValue._doubleValue = QLOptimizeGetDouble(valueNode); + } + else if (range->_valueType == RANGE_TYPE_STRING) { + range->_maxValue._stringValue = TRI_DuplicateString(valueNode->_value._stringValue); + } + + range->_minStatus = RANGE_VALUE_INFINITE; + if (type == TRI_QueryNodeBinaryOperatorLessEqual) { + // value is included (<=) , range is [ -inf ... value (inc) ] + range->_maxStatus = RANGE_VALUE_INCLUDED; + } + else { + // value is excluded (<) , range is [ -inf ... value (exc) ] + range->_maxStatus = RANGE_VALUE_EXCLUDED; + } + } + + return range; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief recursively optimize nodes in an expression AST +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t* QLOptimizeCondition (TRI_query_node_t* node) { + TRI_query_node_t *lhs, *rhs; + TRI_vector_pointer_t* ranges; + TRI_vector_pointer_t* combinedRanges; + TRI_query_node_type_e type; + + if (!node) { + return NULL; + } + + if (TRI_QueryNodeIsValueNode(node)) { + return NULL; + } + + type = node->_type; + lhs = node->_lhs; + rhs = node->_rhs; + + if (type == TRI_QueryNodeBinaryOperatorAnd || type == TRI_QueryNodeBinaryOperatorOr) { + // logical && or logical || + + // get the range vectors from both operands + ranges = QLOptimizeMergeRangeVectors(QLOptimizeCondition(lhs), + QLOptimizeCondition(rhs)); + if (ranges) { + if (ranges->_length > 0) { + // try to merge the ranges + combinedRanges = QLOptimizeCombineRanges(type, node, ranges); + } + else { + combinedRanges = NULL; + } + return combinedRanges; + } + } + else if (type == TRI_QueryNodeBinaryOperatorIdentical || + type == TRI_QueryNodeBinaryOperatorUnidentical || + type == TRI_QueryNodeBinaryOperatorEqual || + type == TRI_QueryNodeBinaryOperatorUnequal || + type == TRI_QueryNodeBinaryOperatorLess || + type == TRI_QueryNodeBinaryOperatorGreater || + type == TRI_QueryNodeBinaryOperatorLessEqual || + type == TRI_QueryNodeBinaryOperatorGreaterEqual) { + // comparison operator + if (lhs->_type == TRI_QueryNodeContainerMemberAccess && + rhs->_type == TRI_QueryNodeContainerMemberAccess && + (type == TRI_QueryNodeBinaryOperatorIdentical || + type == TRI_QueryNodeBinaryOperatorEqual)) { + // collection.attribute relop collection.attribute + return QLOptimizeMergeRangeVectors( + QLOptimizeCreateRangeVector(QLOptimizeCreateRange(lhs, rhs, type)), + QLOptimizeCreateRangeVector(QLOptimizeCreateRange(rhs, lhs, type)) + ); + } + else if (lhs->_type == TRI_QueryNodeContainerMemberAccess && + (type == TRI_QueryNodeBinaryOperatorIdentical || + type == TRI_QueryNodeBinaryOperatorEqual) && + (rhs->_type == TRI_QueryNodeValueDocument || rhs->_type == TRI_QueryNodeValueArray) && + QLOptimizeIsStaticDocument(rhs)) { + // collection.attribute == document + return QLOptimizeCreateRangeVector(QLOptimizeCreateRange(lhs, rhs, type)); + } + else if (lhs->_type == TRI_QueryNodeContainerMemberAccess && + (rhs->_type == TRI_QueryNodeValueNumberDouble || + rhs->_type == TRI_QueryNodeValueNumberDoubleString || + rhs->_type == TRI_QueryNodeValueString)) { + // collection.attribute relop value + return QLOptimizeCreateRangeVector(QLOptimizeCreateRange(lhs, rhs, type)); + } + else if (rhs->_type == TRI_QueryNodeContainerMemberAccess && + (type == TRI_QueryNodeBinaryOperatorIdentical || + type == TRI_QueryNodeBinaryOperatorEqual) && + lhs->_type == TRI_QueryNodeValueDocument && + QLOptimizeIsStaticDocument(lhs)) { + // document == collection.attribute + return QLOptimizeCreateRangeVector(QLOptimizeCreateRange(rhs, lhs, type)); + } else if (rhs->_type == TRI_QueryNodeContainerMemberAccess && + (lhs->_type == TRI_QueryNodeValueNumberDouble || + lhs->_type == TRI_QueryNodeValueNumberDoubleString || + lhs->_type == TRI_QueryNodeValueString)) { + // value relop collection.attrbiute + return QLOptimizeCreateRangeVector( + QLOptimizeCreateRange(rhs, lhs, TRI_QueryNodeGetReversedRelationalOperator(type))); + } + } + + return NULL; +} //////////////////////////////////////////////////////////////////////////////// /// @brief get the type of a query's SELECT part //////////////////////////////////////////////////////////////////////////////// -QL_ast_query_select_type_e QLOptimizeGetSelectType (const QL_ast_query_t *query) { - QL_ast_node_t *selectNode = query->_select._base; - - if (selectNode == 0) { +QL_ast_query_select_type_e QLOptimizeGetSelectType (const TRI_query_node_t* const selectNode, + const char* primaryAlias) { + if (!selectNode) { return QLQuerySelectTypeUndefined; } - if (selectNode->_type == QLNodeValueIdentifier && selectNode->_value._stringValue != 0) { - char *alias = QLAstQueryGetPrimaryAlias(query); - - if (alias !=0 && strcmp(alias, selectNode->_value._stringValue) == 0) { + if (selectNode->_type == TRI_QueryNodeValueIdentifier && + selectNode->_value._stringValue) { + + if (primaryAlias && strcmp(primaryAlias, selectNode->_value._stringValue) == 0) { // primary document alias specified as (only) SELECT part return QLQuerySelectTypeSimple; } @@ -576,24 +1584,23 @@ QL_ast_query_select_type_e QLOptimizeGetSelectType (const QL_ast_query_t *query) return QLQuerySelectTypeEvaluated; } - //////////////////////////////////////////////////////////////////////////////// /// @brief get the type of a query's WHERE/ON condition //////////////////////////////////////////////////////////////////////////////// -QL_ast_query_where_type_e QLOptimizeGetWhereType (const QL_ast_node_t *node) { - if (node == 0) { +QL_ast_query_where_type_e QLOptimizeGetWhereType (const TRI_query_node_t* const node) { + if (!node) { // query does not have a WHERE part return QLQueryWhereTypeAlwaysTrue; } - - if (QLAstNodeIsBooleanizable(node)) { + + if (TRI_QueryNodeIsBooleanizable(node)) { // WHERE part is constant if (QLOptimizeGetBool(node)) { // WHERE is always true return QLQueryWhereTypeAlwaysTrue; } - // WHERE is always false + // WHERE is always false return QLQueryWhereTypeAlwaysFalse; } @@ -601,6 +1608,31 @@ QL_ast_query_where_type_e QLOptimizeGetWhereType (const QL_ast_node_t *node) { return QLQueryWhereTypeMustEvaluate; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the type of a query's ORDER BY condition +//////////////////////////////////////////////////////////////////////////////// + +QL_ast_query_order_type_e QLOptimizeGetOrderType (const TRI_query_node_t* const node) { + TRI_query_node_t* nodePtr; + + if (!node) { + // query does not have an ORDER BY part + return QLQueryOrderTypeNone; + } + + nodePtr = node->_next; + while (nodePtr) { + if (!TRI_QueryNodeIsBooleanizable(nodePtr->_lhs)) { + // ORDER BY must be evaluated for all records + return QLQueryOrderTypeMustEvaluate; + } + + nodePtr = nodePtr->_next; + } + + // ORDER BY is constant (same for all records) and can be ignored + return QLQueryOrderTypeNone; +} //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/QL/optimize.h b/QL/optimize.h index de87110991..c8590d039f 100644 --- a/QL/optimize.h +++ b/QL/optimize.h @@ -25,19 +25,74 @@ /// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_DURHAM_QL_OPTIMIZE -#define TRIAGENS_DURHAM_QL_OPTIMIZE +#ifndef TRIAGENS_DURHAM_QL_OPTIMIZE_H +#define TRIAGENS_DURHAM_QL_OPTIMIZE_H 1 #include +#include +#include +#include +#include -#include "QL/ast-node.h" +#include "VocBase/query-node.h" #include "QL/ast-query.h" - +#include "QL/formatter.h" +#include "VocBase/query-javascript.h" +#include "VocBase/index.h" +#include "VocBase/query-parse.h" #ifdef __cplusplus extern "C" { #endif +// ----------------------------------------------------------------------------- +// --SECTION-- documentation +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @page Optimizer Query optimizer +/// +/// The AQL query optimizer inspects incoming select queries and applies simple +/// transformations to optimize them. The goal of all optimization is to do +/// less work when executing the query and produce the results faster. +/// +/// @section Optimizer transformations +/// +/// Currently, the AQL query optimizer applies the following transformations: +/// - constant folding: numeric literals, boolean values and null are folded +/// if possible in the select part, on clause, where clause and order by parts +/// of queries. Constant folding is applied for arithmetic and logical +/// operators if both operands are constants. +/// Furthermore, constant string literal comparisons are evaluated during +/// parsing and replaced with their results. Idem comparisons of collection +/// attributes (e.g. @LIT{users.id == users.id} or @LIT{locs.lat != locs.lat}) +/// are also replaced with the boolean result of the comparison. +/// - where clause removal: if the where clause evaluates to a constant value, +/// it is removed completely. If this constant always evaluates to false, the +/// entire query execution is skipped because the result would be empty anyway. +/// - order by removal: all order by expressions in a query that evaluate to a +/// constant value are removed as they would not influence the sorting. This +/// might lead to all order by parts being removed. +/// - join removal: if a collection is left join'd, right join'd, or list join'd +/// but is not referenced anywhere in the select, where, or order by clauses, +/// it will not influence the results produced by the query. There is no need +/// to execute the join on the collection and thus the join is removed. +/// - range optimization: invalid value ranges in the where clause are detected +/// for fields if the values are numbers or strings and the operators equality, +/// greater/greater than, less/less than are used, and the range conditions +/// are combined with logical ands. For example, the following range condition +/// will be detected as being impossible and removed: +/// @LIT{users.id > 3 && users.id < 3} +/// +/// @section Optimizer issues +/// +/// The optimizer currently cannot optimize subconditions combined with a +/// logical @LIT{||}. Furthermore, it will not optimize negated conditions or +/// subconditions. It can only combine multiple subconditions on the same +/// attribute if the compare values have the same type (numeric or string). +/// The optimizer will not merge conditions from the where clause and any of the +/// on clauses although this might be theoretically possible in some cases. +//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /// @addtogroup QL @@ -45,70 +100,92 @@ extern "C" { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @brief check whether a node is optimizable as an arithmetic operand -//////////////////////////////////////////////////////////////////////////////// - -bool QLOptimizeCanBeUsedAsArithmeticOperand (const QL_ast_node_t*); - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief check whether a node is optimizable as a relational operand -//////////////////////////////////////////////////////////////////////////////// - -bool QLOptimizeCanBeUsedAsRelationalOperand (const QL_ast_node_t*); - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief check whether a node is optimizable as a logical operand -//////////////////////////////////////////////////////////////////////////////// - -bool QLOptimizeCanBeUsedAsLogicalOperand (const QL_ast_node_t*); - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimization function for unary operators +/// @brief Range status types /// -/// this function will optimize unary plus and unary minus operators that are -/// used together with constant values, e.g. it will merge the two nodes "-" and -/// "1" to a "-1". +/// The range status values are used to describe the lower and upper bounds +/// values of a @ref QL_optimize_range_t. The status values have the following +/// meanings: +/// - RANGE_VALUE_INFINITE: indicates that the value is unbounded (infinity) +/// - RANGE_VALUE_INCLUDED: indicates that the value is included in the range +/// - RANGE_VALUE_EXCLUDED: indicates that the value is not included in the range //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeUnaryOperator (QL_ast_node_t *); - +typedef enum { + RANGE_VALUE_INFINITE = 1, + RANGE_VALUE_INCLUDED = 2, + RANGE_VALUE_EXCLUDED = 3 +} +QL_optimize_range_type_e; //////////////////////////////////////////////////////////////////////////////// -/// @brief optimization function for binary operators +/// @brief Range value types /// -/// this function will optimize arithmetic, relational and logical operators -/// that are used together with constant values. It will replace the binary -/// operator with the result of the optimization. -/// The node will therefore change its type from a binary operator to a value -/// type node. The former sub nodes (lhs and rhs) of the binary operator will -/// be unlinked, but not be freed here. -/// Freeing memory is done later when the whole query structure is deallocated. +/// Currently supported types are collection attributes (fields), doubles +/// (numbers), strings, and JSON documents. //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeBinaryOperator (QL_ast_node_t *); - +typedef enum { + RANGE_TYPE_FIELD = 1, + RANGE_TYPE_DOUBLE = 2, + RANGE_TYPE_STRING = 3, + RANGE_TYPE_JSON = 4 +} +QL_optimize_range_value_type_e; //////////////////////////////////////////////////////////////////////////////// -/// @brief optimization function for the ternary operator +/// @brief Range type /// -/// this function will optimize the ternary operator if the conditional part is -/// reducible to a constant. It will substitute the condition with the true -/// part if the condition is true, and with the false part if the condition is -/// false. +/// Ranges are used to store the value ranges that are requested in a query +/// condition part. For example, if the where condition is @LIT{users.id > 1}, +/// a range for users.id from [ 1 ... +inf] would be created. If further +/// conditions are found, additional ranges will be created for them. Multiple +/// ranges combined by logical && and || operators will then be merged into +/// combined ranges. +/// +/// This might already remove some illogical ranges (e.g. for the condition +/// @LIT{users.id == 1 && users.id == 2}) or simplify multiple conditions into +/// one combined condition (e.g. @LIT{users.id > 3 && users.id > 4} would be +/// merged into @LIT{users.id > 4}. +/// +/// For each range, the data type (double or string) is stored. Only ranges of +/// the same data type can be combined together. Ranges with different types are +/// not optimized. Each range has a minimum and a maximum value (bounds), both +/// of which might be infinite in the case of range conditions or for +/// unrestricted ranges. +/// +/// Infinity is indicated by _minStatus or _maxStatus set to +/// (RANGE_VALUE_INFINITE). If the value is not infinity, the status +/// indicates whether the bounds value is included (RANGE_VALUE_INCLUDED) +/// or not included (RANGE_VALUE_EXCLUDED) in the range. //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeTernaryOperator (QL_ast_node_t *); - +typedef struct QL_optimize_range_s { + char* _collection; + char* _field; + QL_optimize_range_value_type_e _valueType; + union { + double _doubleValue; + char* _stringValue; + } _minValue; + union { + double _doubleValue; + char* _stringValue; + } _maxValue; + struct { + char* _collection; + char* _field; + } _refValue; + uint64_t _hash; + QL_optimize_range_type_e _minStatus; + QL_optimize_range_type_e _maxStatus; +} +QL_optimize_range_t; //////////////////////////////////////////////////////////////////////////////// -/// @brief optimize order by +/// @brief optimize order by by removing constant parts //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeOrder (QL_ast_node_t*); - +void QLOptimizeOrder (TRI_query_node_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief recursively optimize nodes in an AST expression @@ -119,22 +196,48 @@ void QLOptimizeOrder (QL_ast_node_t*); /// nesting levels //////////////////////////////////////////////////////////////////////////////// -void QLOptimizeExpression (QL_ast_node_t *); +void QLOptimizeExpression (TRI_query_node_t*); +//////////////////////////////////////////////////////////////////////////////// +/// @brief optimize from/joins +//////////////////////////////////////////////////////////////////////////////// + +void QLOptimizeFrom (TRI_query_template_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free all existing ranges in a range vector +//////////////////////////////////////////////////////////////////////////////// + +void QLOptimizeFreeRangeVector (TRI_vector_pointer_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief recursively optimize condition expressions +/// +/// this function will walk the AST recursively and will start optimization from +/// the bottom-up. this function is suited for conditional expressions as it +/// tries to find suitable ranges for index accesses etc. +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t* QLOptimizeCondition (TRI_query_node_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief get the type of a query's SELECT part //////////////////////////////////////////////////////////////////////////////// -QL_ast_query_select_type_e QLOptimizeGetSelectType (const QL_ast_query_t*); - +QL_ast_query_select_type_e QLOptimizeGetSelectType (const TRI_query_node_t* const, + const char*); //////////////////////////////////////////////////////////////////////////////// /// @brief get the type of a query's WHERE/ON condition //////////////////////////////////////////////////////////////////////////////// -QL_ast_query_where_type_e QLOptimizeGetWhereType (const QL_ast_node_t*); +QL_ast_query_where_type_e QLOptimizeGetWhereType (const TRI_query_node_t* const); +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the type of a query's ORDER BY condition +//////////////////////////////////////////////////////////////////////////////// + +QL_ast_query_order_type_e QLOptimizeGetOrderType (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/QL/parser-context.c b/QL/parser-context.c deleted file mode 100644 index 01aab3f433..0000000000 --- a/QL/parser-context.c +++ /dev/null @@ -1,377 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief parser context for flex-based query scanner -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Jan Steemann -/// @author Copyright 2012, triagens GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#include "QL/ast-node.h" -#include "QL/parser-context.h" - - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief initializes the parser context for a query -//////////////////////////////////////////////////////////////////////////////// - -bool QLParseInit (QL_parser_context_t* context, const char* query) { - // init vectors needed for book-keeping memory - TRI_InitVectorPointer(&context->_nodes); - TRI_InitVectorPointer(&context->_strings); - TRI_InitVectorPointer(&context->_listHeads); - TRI_InitVectorPointer(&context->_listTails); - - // set parse stage - context->_stage = STAGE_PARSE; - - // init lexer/scanner - QLlex_init(&context->_scanner); - QLset_extra(context, context->_scanner); - - // init query data - context->_lexState._length = strlen(query); - context->_lexState._buffer = (char *) query; - - // reset position and error message - context->_lexState._errorState._message = ""; - context->_lexState._errorState._line = 1; - context->_lexState._errorState._column = 1; - - // init query structure - context->_query = (QL_ast_query_t *) TRI_Allocate(sizeof(QL_ast_query_t)); - if (!context->_query) { - return false; - } - - QLAstQueryInit(context->_query); - - return true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief free all memory allocated in context of a query -//////////////////////////////////////////////////////////////////////////////// - -void QLParseFree (QL_parser_context_t* context) { - size_t i; - void *nodePtr; - char *stringPtr; - - // nodes - i = context->_nodes._length; - // free all nodes in vector, starting at the end (prevents copying the remaining elements in vector) - while (i > 0) { - i--; - nodePtr = TRI_RemoveVectorPointer(&context->_nodes, i); - QLParseFreeNode(nodePtr); - if (i == 0) { - break; - } - } - - // strings - i = context->_strings._length; - // free all strings in vector, starting at the end (prevents copying the remaining elements in vector) - while (i > 0) { - i--; - stringPtr = TRI_RemoveVectorPointer(&context->_strings, i); - QLParseFreeString(stringPtr); - if (i == 0) { - break; - } - } - - // list elements in _listHeads and _listTails must not be freed separately as they are AstNodes handled - // by _nodes already - - // free vectors themselves - TRI_DestroyVectorPointer(&context->_strings); - TRI_DestroyVectorPointer(&context->_nodes); - TRI_DestroyVectorPointer(&context->_listHeads); - TRI_DestroyVectorPointer(&context->_listTails); - - // free lexer/scanner - QLlex_destroy(context->_scanner); - - // free collections array in query - QLAstQueryFree(context->_query); - - // free query struct itself - if (context->_query != 0) { - TRI_Free(context->_query); - context->_query = 0; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief keep track of an allocated ast node -//////////////////////////////////////////////////////////////////////////////// - -void QLParseRegisterNode (QL_parser_context_t* context, QL_ast_node_t* element) { - TRI_PushBackVectorPointer(&context->_nodes, element); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief free an ast node -//////////////////////////////////////////////////////////////////////////////// - -void QLParseFreeNode (QL_ast_node_t* element) { - if (element != 0) { - TRI_Free(element); - element = 0; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief copies a string and keeps track of its memory location in a vector -//////////////////////////////////////////////////////////////////////////////// - -char* QLParseAllocString (QL_parser_context_t* context, const char* string) { - // do string duplication - char *copy = TRI_DuplicateString(string); - - // store pointer to copy - return QLParseRegisterString(context, copy); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief copies a string part and keeps track of its memory location in a vector -//////////////////////////////////////////////////////////////////////////////// - -char* QLParseAllocString2 (QL_parser_context_t* context, - const char* string, - const size_t length) { - // do string part duplication - char *copy = TRI_DuplicateString2(string, length); - - // store pointer to copy and return it - return QLParseRegisterString(context, copy); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief keep track of an allocated string -//////////////////////////////////////////////////////////////////////////////// - -char* QLParseRegisterString (QL_parser_context_t* context, const char* string) { - TRI_PushBackVectorPointer(&context->_strings, (char *) string); - - return (char*) string; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief free a string -//////////////////////////////////////////////////////////////////////////////// - -void QLParseFreeString (char* string) { - if (string != 0) { - TRI_Free(string); - string = 0; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create a new node for the ast -//////////////////////////////////////////////////////////////////////////////// - -QL_ast_node_t* QLAstNodeCreate (QL_parser_context_t* context, const QL_ast_node_type_e type) { - // allocate memory - QL_ast_node_t *node = (QL_ast_node_t *) TRI_Allocate(sizeof(QL_ast_node_t)); - - if (node == 0) { - return 0; - } - - // keep track of memory location - QLParseRegisterNode(context, node); - - // set node type - node->_type = type; - - // set initial pointers to 0 - node->_value._stringValue = 0; - node->_lhs = 0; - node->_rhs = 0; - node->_next = 0; - - // set position information - node->_line = QLget_lineno(context->_scanner); - node->_column = QLget_column(context->_scanner); - - return node; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief open a new context layer for the parser -//////////////////////////////////////////////////////////////////////////////// - -void QLParseContextPush (QL_parser_context_t* context, QL_ast_node_t* element) { - TRI_PushBackVectorPointer(&context->_listHeads, element); - TRI_PushBackVectorPointer(&context->_listTails, element); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief close the current context layer of the parser and return it -//////////////////////////////////////////////////////////////////////////////// - -QL_ast_node_t* QLParseContextPop (QL_parser_context_t* context) { - QL_ast_node_t *head; - size_t i; - - i = context->_listHeads._length; - - if (i > 0) { - TRI_RemoveVectorPointer(&context->_listTails, i - 1); - head = TRI_RemoveVectorPointer(&context->_listHeads, i - 1); - return head; - } - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief add an element to the current parsing context -//////////////////////////////////////////////////////////////////////////////// - -void QLParseContextAddElement (QL_parser_context_t* context, QL_ast_node_t* element) { - QL_ast_node_t* last; - size_t i; - - i = context->_listTails._length; - - if (i > 0) { - last = *(context->_listTails._buffer + i -1); - if (last != 0) { - last->_next = element; - *(context->_listTails._buffer + i -1) = element; - } - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief pop the current parse context from the stack into the rhs element -//////////////////////////////////////////////////////////////////////////////// - -void QLPopIntoRhs (QL_ast_node_t* node, QL_parser_context_t* context) { - QL_ast_node_t *popped; - popped = QLParseContextPop(context); - - if (node != 0) { - node->_rhs = popped; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Register a parse error -//////////////////////////////////////////////////////////////////////////////// - -void QLParseRegisterParseError (QL_parser_context_t* context, - const QL_error_type_e errorCode, ...) { - va_list args; - - // set line and column numbers automatically during parsing - context->_lexState._errorState._line = QLget_lineno(context->_scanner); - context->_lexState._errorState._column = QLget_column(context->_scanner); - context->_lexState._errorState._code = errorCode; - va_start(args, errorCode); - context->_lexState._errorState._message = QLParseAllocString(context, QLErrorFormat(errorCode, args)); - va_end(args); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Register a post-parse error -//////////////////////////////////////////////////////////////////////////////// - -void QLParseRegisterPostParseError (QL_parser_context_t* context, - const int32_t line, - const int32_t column, - const QL_error_type_e errorCode, ...) { - va_list args; - - context->_lexState._errorState._line = line; - context->_lexState._errorState._column = column; - context->_lexState._errorState._code = errorCode; - va_start(args, errorCode); - context->_lexState._errorState._message = QLParseAllocString(context, QLErrorFormat(errorCode, args)); - va_end(args); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Validate the query -//////////////////////////////////////////////////////////////////////////////// - -bool QLParseValidate (QL_parser_context_t* context, QL_ast_node_t* node) { - QL_ast_node_t *lhs, *rhs, *next; - QL_ast_node_type_e type; - - if (node == 0) { - return true; - } - - type = node->_type; - if (type == QLNodeContainerList) { - next = node->_next; - while (next) { - if (!QLParseValidate(context, next)) { - return false; - } - next = next->_next; - } - } - - if (node->_type == QLNodeReferenceCollectionAlias) { - if (!QLAstQueryIsValidAlias(context->_query, node->_value._stringValue)) { - QLParseRegisterPostParseError(context, node->_line, node->_column, - ERR_COLLECTION_NAME_UNDECLARED, node->_value._stringValue); - return false; - } - } - - lhs = node->_lhs; - if (lhs != 0) { - if (!QLParseValidate(context, lhs)) { - return false; - } - } - - rhs = node->_rhs; - if (rhs != 0) { - if (!QLParseValidate(context, rhs)) { - return false; - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: diff --git a/QL/parser.c b/QL/parser.c index 6e39db2426..c390179afe 100644 --- a/QL/parser.c +++ b/QL/parser.c @@ -81,21 +81,26 @@ #include #include -#include #include #include #include -#include "QL/ast-node.h" -#include "QL/parser-context.h" -#include "QL/formatter.h" -#include "QL/error.h" +#include "VocBase/query-node.h" +#include "VocBase/query-base.h" +#include "VocBase/query-parse.h" +#include "VocBase/query-error.h" + +#define ABORT_IF_OOM(ptr) \ + if (!ptr) { \ + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_OOM, NULL); \ + YYABORT; \ + } /* Line 189 of yacc.c */ -#line 99 "QL/parser.c" +#line 104 "QL/parser.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -136,35 +141,38 @@ BY = 269, ASC = 270, DESC = 271, - LIMIT = 272, - AND = 273, - OR = 274, - NOT = 275, - IN = 276, - ASSIGNMENT = 277, - GREATER = 278, - LESS = 279, - GREATER_EQUAL = 280, - LESS_EQUAL = 281, - EQUAL = 282, - UNEQUAL = 283, - IDENTICAL = 284, - UNIDENTICAL = 285, - NULLX = 286, - TRUE = 287, - FALSE = 288, - UNDEFINED = 289, - IDENTIFIER = 290, - PARAMETER = 291, - PARAMETER_NAMED = 292, - STRING = 293, - REAL = 294, - COLON = 295, - TERNARY = 296, - FCALL = 297, - UPLUS = 298, - UMINUS = 299, - MEMBER = 300 + WITHIN = 272, + NEAR = 273, + LIMIT = 274, + AND = 275, + OR = 276, + NOT = 277, + IN = 278, + ASSIGNMENT = 279, + GREATER = 280, + LESS = 281, + GREATER_EQUAL = 282, + LESS_EQUAL = 283, + EQUAL = 284, + UNEQUAL = 285, + IDENTICAL = 286, + UNIDENTICAL = 287, + NULLX = 288, + TRUE = 289, + FALSE = 290, + UNDEFINED = 291, + IDENTIFIER = 292, + QUOTED_IDENTIFIER = 293, + PARAMETER = 294, + PARAMETER_NAMED = 295, + STRING = 296, + REAL = 297, + COLON = 298, + TERNARY = 299, + FCALL = 300, + UPLUS = 301, + UMINUS = 302, + MEMBER = 303 }; #endif @@ -175,9 +183,9 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 27 "QL/parser.y" +#line 32 "QL/parser.y" - QL_ast_node_t *node; + TRI_query_node_t* node; int intval; double floatval; char *strval; @@ -185,7 +193,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 189 "QL/parser.c" +#line 197 "QL/parser.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -209,24 +217,19 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ -#line 35 "QL/parser.y" +#line 40 "QL/parser.y" -int QLlex (YYSTYPE *,YYLTYPE *, void *); +int QLlex (YYSTYPE*, YYLTYPE*, void*); -void QLerror (YYLTYPE *locp,QL_parser_context_t *context, const char *err) { - context->_lexState._errorState._code = ERR_PARSE; - context->_lexState._errorState._message = QLParseAllocString(context, (char *) err); - context->_lexState._errorState._line = locp->first_line; - context->_lexState._errorState._column = locp->first_column; +void QLerror (YYLTYPE* locp, TRI_query_template_t* const template_, const char* err) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_PARSE, err); } - - -#define scanner context->_scanner +#define scanner template_->_parser->_scanner /* Line 264 of yacc.c */ -#line 230 "QL/parser.c" +#line 233 "QL/parser.c" #ifdef short # undef short @@ -441,22 +444,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 10 +#define YYFINAL 11 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 263 +#define YYLAST 295 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 60 +#define YYNTOKENS 63 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 42 +#define YYNNTS 51 /* YYNRULES -- Number of rules. */ -#define YYNRULES 104 +#define YYNRULES 122 /* YYNRULES -- Number of states. */ -#define YYNSTATES 164 +#define YYNSTATES 217 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 300 +#define YYMAXUTOK 303 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -467,16 +470,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 46, 2, 2, - 55, 56, 44, 42, 52, 43, 57, 45, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 51, + 2, 2, 2, 2, 2, 2, 2, 49, 2, 2, + 58, 59, 47, 45, 56, 46, 62, 48, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 54, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 58, 2, 59, 2, 2, 2, 2, 2, 2, + 2, 55, 2, 57, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 53, 2, 54, 2, 2, 2, 2, + 2, 2, 2, 60, 2, 61, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -493,8 +496,8 @@ static const yytype_uint8 yytranslate[] = 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 47, 48, 49, - 50 + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 50, 51, 52, 53 }; #if YYDEBUG @@ -503,68 +506,80 @@ static const yytype_uint8 yytranslate[] = static const yytype_uint16 yyprhs[] = { 0, 0, 3, 5, 8, 10, 13, 14, 21, 23, - 24, 28, 30, 36, 37, 40, 41, 42, 47, 49, - 53, 56, 57, 59, 61, 62, 65, 69, 74, 80, - 82, 85, 86, 91, 93, 97, 99, 103, 107, 110, - 112, 114, 116, 118, 121, 123, 126, 130, 133, 137, - 139, 141, 143, 145, 146, 150, 152, 153, 157, 159, - 160, 164, 166, 169, 172, 176, 180, 183, 186, 189, - 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, - 233, 237, 241, 245, 249, 253, 259, 261, 265, 266, - 272, 274, 278, 281, 282, 287, 289, 293, 295, 297, - 299, 301, 303, 305, 307 + 24, 28, 31, 38, 44, 46, 49, 51, 55, 61, + 62, 66, 68, 72, 73, 84, 95, 96, 99, 100, + 101, 106, 108, 112, 115, 116, 118, 120, 121, 124, + 128, 133, 139, 141, 144, 145, 150, 152, 156, 158, + 162, 166, 169, 171, 173, 175, 177, 179, 181, 183, + 186, 188, 191, 195, 198, 202, 205, 209, 211, 213, + 215, 217, 218, 222, 224, 225, 229, 231, 232, 236, + 238, 241, 244, 248, 252, 255, 258, 261, 265, 269, + 273, 277, 281, 285, 289, 293, 297, 301, 305, 309, + 313, 317, 321, 325, 331, 333, 337, 338, 344, 346, + 350, 353, 354, 359, 361, 365, 367, 369, 371, 373, + 375, 377, 379 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 61, 0, -1, 63, -1, 63, 51, -1, 62, -1, - 62, 51, -1, -1, 3, 64, 65, 68, 69, 74, - -1, 75, -1, -1, 4, 66, 67, -1, 80, -1, - 67, 82, 80, 12, 86, -1, -1, 5, 86, -1, - -1, -1, 13, 14, 70, 71, -1, 72, -1, 71, - 52, 72, -1, 86, 73, -1, -1, 15, -1, 16, - -1, -1, 17, 39, -1, 17, 43, 39, -1, 17, - 39, 52, 39, -1, 17, 39, 52, 43, 39, -1, - 81, -1, 53, 54, -1, -1, 53, 76, 77, 54, - -1, 78, -1, 77, 52, 78, -1, 79, -1, 35, - 40, 86, -1, 38, 40, 86, -1, 35, 81, -1, - 35, -1, 83, -1, 84, -1, 85, -1, 7, 6, - -1, 6, -1, 8, 6, -1, 10, 9, 6, -1, - 10, 6, -1, 55, 86, 56, -1, 91, -1, 92, - -1, 93, -1, 94, -1, -1, 75, 87, 90, -1, - 75, -1, -1, 98, 88, 90, -1, 98, -1, -1, - 101, 89, 90, -1, 101, -1, 57, 35, -1, 57, - 94, -1, 90, 57, 35, -1, 90, 57, 94, -1, - 42, 86, -1, 43, 86, -1, 20, 86, -1, 86, - 19, 86, -1, 86, 18, 86, -1, 86, 42, 86, - -1, 86, 43, 86, -1, 86, 44, 86, -1, 86, - 45, 86, -1, 86, 46, 86, -1, 86, 29, 86, - -1, 86, 30, 86, -1, 86, 27, 86, -1, 86, - 28, 86, -1, 86, 24, 86, -1, 86, 23, 86, - -1, 86, 26, 86, -1, 86, 25, 86, -1, 86, - 21, 86, -1, 86, 41, 86, 40, 86, -1, 95, - -1, 35, 55, 56, -1, -1, 35, 55, 96, 97, - 56, -1, 86, -1, 97, 52, 86, -1, 58, 59, - -1, -1, 58, 99, 100, 59, -1, 86, -1, 100, - 52, 86, -1, 38, -1, 39, -1, 31, -1, 34, - -1, 32, -1, 33, -1, 36, -1, 37, -1 + 64, 0, -1, 66, -1, 66, 54, -1, 65, -1, + 65, 54, -1, -1, 3, 67, 68, 79, 80, 85, + -1, 86, -1, -1, 4, 69, 70, -1, 91, 78, + -1, 70, 94, 91, 78, 12, 98, -1, 55, 72, + 56, 72, 57, -1, 42, -1, 46, 42, -1, 71, + -1, 72, 56, 72, -1, 55, 75, 56, 75, 57, + -1, -1, 93, 76, 102, -1, 74, -1, 75, 56, + 75, -1, -1, 17, 93, 24, 58, 77, 56, 73, + 56, 42, 59, -1, 18, 93, 24, 58, 77, 56, + 73, 56, 42, 59, -1, -1, 5, 98, -1, -1, + -1, 13, 14, 81, 82, -1, 83, -1, 82, 56, + 83, -1, 98, 84, -1, -1, 15, -1, 16, -1, + -1, 19, 42, -1, 19, 46, 42, -1, 19, 42, + 56, 42, -1, 19, 42, 56, 46, 42, -1, 93, + -1, 60, 61, -1, -1, 60, 87, 88, 61, -1, + 89, -1, 88, 56, 89, -1, 90, -1, 37, 43, + 98, -1, 41, 43, 98, -1, 92, 93, -1, 37, + -1, 38, -1, 37, -1, 38, -1, 95, -1, 96, + -1, 97, -1, 7, 6, -1, 6, -1, 8, 6, + -1, 10, 9, 6, -1, 10, 6, -1, 11, 9, + 6, -1, 11, 6, -1, 58, 98, 59, -1, 103, + -1, 104, -1, 105, -1, 106, -1, -1, 86, 99, + 102, -1, 86, -1, -1, 110, 100, 102, -1, 110, + -1, -1, 113, 101, 102, -1, 113, -1, 62, 37, + -1, 62, 106, -1, 102, 62, 37, -1, 102, 62, + 106, -1, 45, 98, -1, 46, 98, -1, 22, 98, + -1, 98, 21, 98, -1, 98, 20, 98, -1, 98, + 45, 98, -1, 98, 46, 98, -1, 98, 47, 98, + -1, 98, 48, 98, -1, 98, 49, 98, -1, 98, + 31, 98, -1, 98, 32, 98, -1, 98, 29, 98, + -1, 98, 30, 98, -1, 98, 26, 98, -1, 98, + 25, 98, -1, 98, 28, 98, -1, 98, 27, 98, + -1, 98, 23, 98, -1, 98, 44, 98, 43, 98, + -1, 107, -1, 37, 58, 59, -1, -1, 37, 58, + 108, 109, 59, -1, 98, -1, 109, 56, 98, -1, + 55, 57, -1, -1, 55, 111, 112, 57, -1, 98, + -1, 112, 56, 98, -1, 41, -1, 42, -1, 33, + -1, 36, -1, 34, -1, 35, -1, 39, -1, 40, + -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 119, 119, 121, 123, 125, 130, 136, 149, 156, - 156, 166, 184, 211, 214, 221, 224, 224, 234, 237, - 243, 253, 259, 265, 274, 276, 289, 302, 322, 345, - 349, 353, 353, 364, 367, 373, 379, 391, 407, 423, - 432, 435, 438, 444, 450, 453, 459, 462, 468, 471, - 474, 477, 480, 483, 483, 493, 496, 496, 506, 509, - 509, 519, 526, 533, 536, 543, 549, 555, 561, 570, - 577, 584, 591, 598, 605, 612, 619, 626, 633, 640, - 647, 654, 661, 668, 675, 685, 700, 706, 718, 718, - 736, 739, 745, 748, 748, 760, 763, 769, 776, 787, - 790, 793, 799, 805, 819 + 0, 129, 129, 131, 133, 135, 140, 146, 159, 167, + 167, 179, 191, 212, 225, 239, 256, 260, 273, 285, + 285, 299, 303, 315, 318, 345, 379, 382, 390, 393, + 393, 405, 409, 416, 427, 432, 437, 445, 447, 460, + 473, 493, 516, 521, 526, 526, 539, 543, 550, 557, + 570, 586, 618, 624, 634, 640, 650, 654, 658, 665, + 672, 676, 683, 687, 691, 695, 702, 706, 710, 714, + 718, 722, 722, 733, 737, 737, 748, 752, 752, 763, + 771, 778, 782, 789, 797, 803, 809, 818, 826, 834, + 842, 850, 858, 866, 874, 882, 890, 898, 906, 914, + 922, 930, 938, 949, 966, 973, 985, 985, 1003, 1006, + 1013, 1017, 1017, 1029, 1032, 1039, 1046, 1057, 1061, 1065, + 1070, 1075, 1088 }; #endif @@ -575,21 +590,24 @@ static const char *const yytname[] = { "$end", "error", "$undefined", "SELECT", "FROM", "WHERE", "JOIN", "LIST", "INNER", "OUTER", "LEFT", "RIGHT", "ON", "ORDER", "BY", "ASC", - "DESC", "LIMIT", "AND", "OR", "NOT", "IN", "ASSIGNMENT", "GREATER", - "LESS", "GREATER_EQUAL", "LESS_EQUAL", "EQUAL", "UNEQUAL", "IDENTICAL", - "UNIDENTICAL", "NULLX", "TRUE", "FALSE", "UNDEFINED", "IDENTIFIER", - "PARAMETER", "PARAMETER_NAMED", "STRING", "REAL", "COLON", "TERNARY", - "'+'", "'-'", "'*'", "'/'", "'%'", "FCALL", "UPLUS", "UMINUS", "MEMBER", - "';'", "','", "'{'", "'}'", "'('", "')'", "'.'", "'['", "']'", "$accept", - "query", "empty_query", "select_query", "select_clause", "from_clause", - "$@1", "from_list", "where_clause", "order_clause", "$@2", "order_list", - "order_element", "order_direction", "limit_clause", "document", "$@3", + "DESC", "WITHIN", "NEAR", "LIMIT", "AND", "OR", "NOT", "IN", + "ASSIGNMENT", "GREATER", "LESS", "GREATER_EQUAL", "LESS_EQUAL", "EQUAL", + "UNEQUAL", "IDENTICAL", "UNIDENTICAL", "NULLX", "TRUE", "FALSE", + "UNDEFINED", "IDENTIFIER", "QUOTED_IDENTIFIER", "PARAMETER", + "PARAMETER_NAMED", "STRING", "REAL", "COLON", "TERNARY", "'+'", "'-'", + "'*'", "'/'", "'%'", "FCALL", "UPLUS", "UMINUS", "MEMBER", "';'", "'['", + "','", "']'", "'('", "')'", "'{'", "'}'", "'.'", "$accept", "query", + "empty_query", "select_query", "select_clause", "from_clause", "$@1", + "from_list", "geo_2dvalue", "geo_1dvalue", "geo_value", + "geo_2dreference", "geo_1dreference", "$@2", "geo_reference", + "geo_restriction", "where_clause", "order_clause", "$@3", "order_list", + "order_element", "order_direction", "limit_clause", "document", "$@4", "attribute_list", "attribute", "named_attribute", "collection_reference", - "collection_alias", "join_type", "list_join", "inner_join", "outer_join", - "expression", "$@4", "$@5", "$@6", "object_access", "unary_operator", - "binary_operator", "conditional_operator", "function_call", - "function_invocation", "$@7", "function_args_list", "array_declaration", - "$@8", "array_list", "atom", 0 + "collection_name", "collection_alias", "join_type", "list_join", + "inner_join", "outer_join", "expression", "$@5", "$@6", "$@7", + "object_access", "unary_operator", "binary_operator", + "conditional_operator", "function_call", "function_invocation", "$@8", + "function_args_list", "array_declaration", "$@9", "array_list", "atom", 0 }; #endif @@ -602,41 +620,46 @@ static const yytype_uint16 yytoknum[] = 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 43, 45, 42, 47, 37, 297, 298, 299, - 300, 59, 44, 123, 125, 40, 41, 46, 91, 93 + 295, 296, 297, 298, 299, 43, 45, 42, 47, 37, + 300, 301, 302, 303, 59, 91, 44, 93, 40, 41, + 123, 125, 46 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 60, 61, 61, 61, 61, 62, 63, 64, 66, - 65, 67, 67, 68, 68, 69, 70, 69, 71, 71, - 72, 73, 73, 73, 74, 74, 74, 74, 74, 75, - 75, 76, 75, 77, 77, 78, 79, 79, 80, 81, - 82, 82, 82, 83, 84, 84, 85, 85, 86, 86, - 86, 86, 86, 87, 86, 86, 88, 86, 86, 89, - 86, 86, 90, 90, 90, 90, 91, 91, 91, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 93, 94, 95, 96, 95, - 97, 97, 98, 99, 98, 100, 100, 101, 101, 101, - 101, 101, 101, 101, 101 + 0, 63, 64, 64, 64, 64, 65, 66, 67, 69, + 68, 70, 70, 71, 72, 72, 73, 73, 74, 76, + 75, 77, 77, 78, 78, 78, 79, 79, 80, 81, + 80, 82, 82, 83, 84, 84, 84, 85, 85, 85, + 85, 85, 86, 86, 87, 86, 88, 88, 89, 90, + 90, 91, 92, 92, 93, 93, 94, 94, 94, 95, + 96, 96, 97, 97, 97, 97, 98, 98, 98, 98, + 98, 99, 98, 98, 100, 98, 98, 101, 98, 98, + 102, 102, 102, 102, 103, 103, 103, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 104, 105, 106, 107, 108, 107, 109, 109, + 110, 111, 110, 112, 112, 113, 113, 113, 113, 113, + 113, 113, 113 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 2, 1, 2, 0, 6, 1, 0, - 3, 1, 5, 0, 2, 0, 0, 4, 1, 3, - 2, 0, 1, 1, 0, 2, 3, 4, 5, 1, - 2, 0, 4, 1, 3, 1, 3, 3, 2, 1, - 1, 1, 1, 2, 1, 2, 3, 2, 3, 1, - 1, 1, 1, 0, 3, 1, 0, 3, 1, 0, - 3, 1, 2, 2, 3, 3, 2, 2, 2, 3, + 3, 2, 6, 5, 1, 2, 1, 3, 5, 0, + 3, 1, 3, 0, 10, 10, 0, 2, 0, 0, + 4, 1, 3, 2, 0, 1, 1, 0, 2, 3, + 4, 5, 1, 2, 0, 4, 1, 3, 1, 3, + 3, 2, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 2, 3, 2, 3, 2, 3, 1, 1, 1, + 1, 0, 3, 1, 0, 3, 1, 0, 3, 1, + 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 5, 1, 3, 0, 5, - 1, 3, 2, 0, 4, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 1 + 3, 3, 3, 5, 1, 3, 0, 5, 1, 3, + 2, 0, 4, 1, 3, 1, 1, 1, 1, 1, + 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -644,157 +667,180 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 6, 0, 0, 4, 2, 39, 31, 0, 8, 29, - 1, 5, 3, 30, 0, 9, 13, 0, 0, 0, - 33, 35, 0, 0, 15, 0, 0, 0, 32, 0, - 10, 11, 0, 99, 101, 102, 100, 39, 103, 104, - 97, 98, 0, 0, 0, 93, 55, 14, 49, 50, - 51, 52, 86, 58, 61, 0, 24, 36, 37, 34, - 38, 44, 0, 0, 0, 0, 40, 41, 42, 68, - 88, 66, 67, 0, 92, 0, 0, 0, 0, 0, + 6, 0, 0, 4, 2, 54, 55, 44, 0, 8, + 42, 1, 5, 3, 43, 0, 9, 26, 0, 0, + 0, 46, 48, 0, 0, 28, 0, 0, 0, 45, + 52, 53, 10, 23, 0, 0, 117, 119, 120, 118, + 54, 121, 122, 115, 116, 0, 0, 111, 0, 73, + 27, 67, 68, 69, 70, 104, 76, 79, 0, 37, + 49, 50, 47, 60, 0, 0, 0, 0, 0, 56, + 57, 58, 0, 0, 11, 51, 86, 106, 84, 85, + 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 16, 0, 7, 43, - 45, 47, 0, 0, 87, 0, 48, 95, 0, 0, - 54, 70, 69, 84, 81, 80, 83, 82, 78, 79, - 76, 77, 0, 71, 72, 73, 74, 75, 57, 60, - 0, 25, 0, 46, 0, 90, 0, 0, 94, 62, - 63, 0, 0, 17, 18, 21, 0, 26, 12, 0, - 89, 96, 64, 65, 85, 0, 22, 23, 20, 27, - 0, 91, 19, 28 + 0, 0, 0, 29, 0, 7, 59, 61, 63, 0, + 65, 0, 23, 0, 0, 105, 0, 113, 0, 66, + 0, 72, 88, 87, 102, 99, 98, 101, 100, 96, + 97, 94, 95, 0, 89, 90, 91, 92, 93, 75, + 78, 0, 38, 0, 62, 64, 0, 0, 0, 108, + 0, 0, 112, 80, 81, 0, 0, 30, 31, 34, + 0, 39, 0, 0, 0, 0, 107, 114, 82, 83, + 103, 0, 35, 36, 33, 40, 0, 12, 0, 21, + 0, 0, 19, 0, 109, 32, 41, 0, 0, 0, + 0, 0, 0, 22, 14, 0, 0, 16, 0, 0, + 20, 0, 0, 15, 0, 0, 0, 0, 18, 0, + 17, 0, 0, 0, 24, 25, 13 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 2, 3, 4, 7, 16, 22, 30, 24, 56, - 130, 143, 144, 158, 98, 46, 14, 19, 20, 21, - 31, 9, 65, 66, 67, 68, 145, 76, 94, 95, - 110, 48, 49, 50, 51, 52, 105, 136, 53, 75, - 108, 54 + -1, 2, 3, 4, 8, 17, 23, 32, 197, 198, + 199, 179, 180, 190, 181, 74, 25, 59, 141, 157, + 158, 174, 105, 49, 15, 20, 21, 22, 33, 34, + 10, 68, 69, 70, 71, 159, 83, 101, 102, 121, + 51, 52, 53, 54, 55, 116, 150, 56, 81, 118, + 57 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -106 +#define YYPACT_NINF -136 static const yytype_int16 yypact[] = { - 15, -28, 1, -16, 22, -106, 27, 72, -106, -106, - -106, -106, -106, -106, 12, -106, 99, 66, 68, -1, - -106, -106, 74, 52, 100, 52, 52, 12, -106, 77, - 16, -106, 52, -106, -106, -106, -106, 60, -106, -106, - -106, -106, 52, 52, 52, 58, 59, 164, -106, -106, - -106, -106, -106, 61, 63, 109, 111, 164, 164, -106, - -106, -106, 131, 132, 65, 74, -106, -106, -106, -106, - 83, -106, -106, -13, -106, 52, 84, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 84, 84, -106, 3, -106, -106, - -106, -106, 134, 130, -106, 52, -106, 164, -25, 108, - 87, 203, 193, 217, -5, -5, -5, -5, 54, 54, - 54, 54, 135, 57, 57, -106, -106, -106, 87, 87, - 52, 93, 107, -106, 52, 164, -8, 52, -106, 60, - -106, 120, 52, 105, -106, 106, 6, -106, 164, 52, - -106, 164, 60, -106, 164, 52, -106, -106, -106, -106, - 127, 164, -106, -106 + 7, 18, 2, -27, -8, -136, -136, 76, 157, -136, + -136, -136, -136, -136, -136, 77, -136, 167, 131, 143, + 60, -136, -136, 22, 62, 174, 62, 62, 77, -136, + -136, -136, 75, 114, 42, 62, -136, -136, -136, -136, + 130, -136, -136, -136, -136, 62, 62, 132, 62, 128, + 180, -136, -136, -136, -136, -136, 129, 140, 178, 185, + 180, 180, -136, -136, 207, 208, 15, 153, 22, -136, + -136, -136, 42, 42, -136, -136, -136, 156, -136, -136, + -136, 62, -12, 154, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 154, 154, -136, -2, -136, -136, -136, -136, 211, + -136, 212, 114, 195, 196, -136, 62, 180, 99, -136, + 184, 160, 220, 210, 64, 78, 78, 78, 78, 3, + 3, 3, 3, 150, 136, 136, -136, -136, -136, 160, + 160, 62, 175, 181, -136, -136, 222, 186, 202, 180, + 104, 62, -136, 130, -136, 216, 62, 176, -136, 120, + 92, -136, 62, 50, 50, 62, -136, 180, 130, -136, + 180, 62, -136, -136, -136, -136, 219, 180, 42, -136, + 198, 206, -136, 214, 180, -136, -136, 215, 42, -1, + 154, -1, 42, -136, -136, 221, 111, -136, 217, 218, + 160, 223, 224, -136, 226, 111, 230, 233, -136, 111, + -136, 205, 225, 228, -136, -136, -136 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -106, -106, -106, -106, -106, -106, -106, -106, -106, -106, - -106, -106, 13, -106, -106, 166, -106, -106, 142, -106, - 119, 141, -106, -106, -106, -106, -23, -106, -106, -106, - -2, -106, -106, -106, -105, -106, -106, -106, -106, -106, - -106, -106 + -136, -136, -136, -136, -136, -136, -136, -136, -136, -90, + 85, -136, -135, -136, 113, 166, -136, -136, -136, -136, + 109, -136, -136, 282, -136, -136, 258, -136, 227, -136, + -34, -136, -136, -136, -136, -23, -136, -136, -136, -96, + -136, -136, -136, -113, -136, -136, -136, -136, -136, -136, + -136 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -60 +#define YYTABLE_NINF -78 static const yytype_int16 yytable[] = { - 47, 10, 57, 58, 140, 77, 78, 5, 79, 69, - 80, 81, 82, 83, 84, 85, 86, 87, 1, 71, - 72, 73, 61, 62, 63, 6, 64, 137, 88, 89, - 90, 91, 92, 93, 138, 11, 153, 89, 90, 91, - 92, 93, 131, 106, 149, 159, 132, 17, 150, 160, - 18, 27, 107, 28, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 101, 32, 12, 102, 79, 15, 80, 81, 82, - 83, 13, 135, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 128, 129, 42, 43, 89, 90, 91, 92, - 93, 91, 92, 93, 23, 6, 25, 44, 26, 29, - 45, 148, 5, 55, 151, 70, -53, 74, -56, 154, - -59, 156, 157, 96, 77, 78, 161, 79, 97, 80, - 81, 82, 83, 84, 85, 86, 87, 99, 100, 104, - 133, 109, 134, 139, 141, 146, 147, 88, 89, 90, - 91, 92, 93, 77, 78, 152, 79, 155, 80, 81, - 82, 83, 84, 85, 86, 87, 163, 8, 162, 59, - 60, 0, 0, 0, 0, 142, 88, 89, 90, 91, - 92, 93, 77, 78, 103, 79, 0, 80, 81, 82, - 83, 84, 85, 86, 87, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 88, 89, 90, 91, 92, - 93, 77, 0, 0, 79, 0, 80, 81, 82, 83, - 84, 85, 86, 87, 79, 0, 80, 81, 82, 83, - 84, 85, 86, 87, 0, 89, 90, 91, 92, 93, - 80, 81, 82, 83, 0, 89, 90, 91, 92, 93, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, - 90, 91, 92, 93 + 75, 50, 11, 60, 61, 139, 140, 154, 84, 85, + 1, 86, 76, 87, 88, 89, 90, 91, 92, 93, + 94, 108, 78, 79, 109, 82, 86, 12, 87, 88, + 89, 90, 95, 96, 97, 98, 99, 100, 113, 114, + 142, 194, 169, 187, 143, 195, 13, 119, 96, 97, + 98, 99, 100, 193, 196, 5, 6, 202, 117, 30, + 31, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 7, 5, + 6, 63, 64, 65, 35, 66, 67, 5, 6, 87, + 88, 89, 90, 149, 200, 36, 37, 38, 39, 40, + 6, 41, 42, 43, 44, 178, 204, 45, 46, 96, + 97, 98, 99, 100, 18, 210, 28, 47, 19, 213, + 48, 29, 7, 96, 97, 98, 99, 100, 167, 182, + 182, 72, 73, 170, 175, 172, 173, 14, 176, 177, + 84, 85, 184, 86, 182, 87, 88, 89, 90, 91, + 92, 93, 94, 194, 182, 151, 152, 195, 182, 110, + 165, 16, 111, 166, 95, 96, 97, 98, 99, 100, + 84, 85, 24, 86, 26, 87, 88, 89, 90, 91, + 92, 93, 94, 98, 99, 100, 27, 58, 77, 80, + -71, -74, 103, 156, 95, 96, 97, 98, 99, 100, + 84, 85, -77, 86, 104, 87, 88, 89, 90, 91, + 92, 93, 94, 106, 107, 115, 120, 144, 145, 147, + 148, 153, 155, 161, 95, 96, 97, 98, 99, 100, + 84, 160, 171, 86, 162, 87, 88, 89, 90, 91, + 92, 93, 94, 86, 163, 87, 88, 89, 90, 91, + 92, 93, 94, 168, 188, 96, 97, 98, 99, 100, + 164, 186, 189, 203, 214, 96, 97, 98, 99, 100, + 191, 192, 211, 205, 206, 212, 201, 183, 146, 207, + 185, 208, 209, 9, 215, 216, 62, 0, 0, 0, + 0, 0, 0, 0, 0, 112 }; static const yytype_int16 yycheck[] = { - 23, 0, 25, 26, 109, 18, 19, 35, 21, 32, - 23, 24, 25, 26, 27, 28, 29, 30, 3, 42, - 43, 44, 6, 7, 8, 53, 10, 52, 41, 42, - 43, 44, 45, 46, 59, 51, 141, 42, 43, 44, - 45, 46, 39, 56, 52, 39, 43, 35, 56, 43, - 38, 52, 75, 54, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 6, 20, 51, 9, 21, 4, 23, 24, 25, - 26, 54, 105, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 94, 95, 42, 43, 42, 43, 44, 45, - 46, 44, 45, 46, 5, 53, 40, 55, 40, 35, - 58, 134, 35, 13, 137, 55, 57, 59, 57, 142, - 57, 15, 16, 14, 18, 19, 149, 21, 17, 23, - 24, 25, 26, 27, 28, 29, 30, 6, 6, 56, - 6, 57, 12, 35, 57, 52, 39, 41, 42, 43, - 44, 45, 46, 18, 19, 35, 21, 52, 23, 24, - 25, 26, 27, 28, 29, 30, 39, 1, 155, 27, - 29, -1, -1, -1, -1, 40, 41, 42, 43, 44, - 45, 46, 18, 19, 65, 21, -1, 23, 24, 25, - 26, 27, 28, 29, 30, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 41, 42, 43, 44, 45, - 46, 18, -1, -1, 21, -1, 23, 24, 25, 26, - 27, 28, 29, 30, 21, -1, 23, 24, 25, 26, - 27, 28, 29, 30, -1, 42, 43, 44, 45, 46, - 23, 24, 25, 26, -1, 42, 43, 44, 45, 46, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 42, - 43, 44, 45, 46 + 34, 24, 0, 26, 27, 101, 102, 120, 20, 21, + 3, 23, 35, 25, 26, 27, 28, 29, 30, 31, + 32, 6, 45, 46, 9, 48, 23, 54, 25, 26, + 27, 28, 44, 45, 46, 47, 48, 49, 72, 73, + 42, 42, 155, 178, 46, 46, 54, 59, 45, 46, + 47, 48, 49, 188, 55, 37, 38, 192, 81, 37, + 38, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 60, 37, + 38, 6, 7, 8, 22, 10, 11, 37, 38, 25, + 26, 27, 28, 116, 190, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 55, 196, 45, 46, 45, + 46, 47, 48, 49, 37, 205, 56, 55, 41, 209, + 58, 61, 60, 45, 46, 47, 48, 49, 151, 163, + 164, 17, 18, 156, 42, 15, 16, 61, 46, 162, + 20, 21, 165, 23, 178, 25, 26, 27, 28, 29, + 30, 31, 32, 42, 188, 56, 57, 46, 192, 6, + 56, 4, 9, 59, 44, 45, 46, 47, 48, 49, + 20, 21, 5, 23, 43, 25, 26, 27, 28, 29, + 30, 31, 32, 47, 48, 49, 43, 13, 58, 57, + 62, 62, 14, 43, 44, 45, 46, 47, 48, 49, + 20, 21, 62, 23, 19, 25, 26, 27, 28, 29, + 30, 31, 32, 6, 6, 59, 62, 6, 6, 24, + 24, 37, 62, 42, 44, 45, 46, 47, 48, 49, + 20, 56, 56, 23, 12, 25, 26, 27, 28, 29, + 30, 31, 32, 23, 58, 25, 26, 27, 28, 29, + 30, 31, 32, 37, 56, 45, 46, 47, 48, 49, + 58, 42, 56, 42, 59, 45, 46, 47, 48, 49, + 56, 56, 42, 56, 56, 42, 191, 164, 112, 56, + 171, 57, 56, 1, 59, 57, 28, -1, -1, -1, + -1, -1, -1, -1, -1, 68 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 3, 61, 62, 63, 35, 53, 64, 75, 81, - 0, 51, 51, 54, 76, 4, 65, 35, 38, 77, - 78, 79, 66, 5, 68, 40, 40, 52, 54, 35, - 67, 80, 20, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 42, 43, 55, 58, 75, 86, 91, 92, - 93, 94, 95, 98, 101, 13, 69, 86, 86, 78, - 81, 6, 7, 8, 10, 82, 83, 84, 85, 86, - 55, 86, 86, 86, 59, 99, 87, 18, 19, 21, - 23, 24, 25, 26, 27, 28, 29, 30, 41, 42, - 43, 44, 45, 46, 88, 89, 14, 17, 74, 6, - 6, 6, 9, 80, 56, 96, 56, 86, 100, 57, - 90, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 90, 90, - 70, 39, 43, 6, 12, 86, 97, 52, 59, 35, - 94, 57, 40, 71, 72, 86, 52, 39, 86, 52, - 56, 86, 35, 94, 86, 52, 15, 16, 73, 39, - 43, 86, 72, 39 + 0, 3, 64, 65, 66, 37, 38, 60, 67, 86, + 93, 0, 54, 54, 61, 87, 4, 68, 37, 41, + 88, 89, 90, 69, 5, 79, 43, 43, 56, 61, + 37, 38, 70, 91, 92, 22, 33, 34, 35, 36, + 37, 39, 40, 41, 42, 45, 46, 55, 58, 86, + 98, 103, 104, 105, 106, 107, 110, 113, 13, 80, + 98, 98, 89, 6, 7, 8, 10, 11, 94, 95, + 96, 97, 17, 18, 78, 93, 98, 58, 98, 98, + 57, 111, 98, 99, 20, 21, 23, 25, 26, 27, + 28, 29, 30, 31, 32, 44, 45, 46, 47, 48, + 49, 100, 101, 14, 19, 85, 6, 6, 6, 9, + 6, 9, 91, 93, 93, 59, 108, 98, 112, 59, + 62, 102, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 98, 98, 98, 98, 98, 98, 98, 102, + 102, 81, 42, 46, 6, 6, 78, 24, 24, 98, + 109, 56, 57, 37, 106, 62, 43, 82, 83, 98, + 56, 42, 12, 58, 58, 56, 59, 98, 37, 106, + 98, 56, 15, 16, 84, 42, 46, 98, 55, 74, + 75, 77, 93, 77, 98, 83, 42, 75, 56, 56, + 76, 56, 56, 75, 42, 46, 55, 71, 72, 73, + 102, 73, 75, 42, 72, 56, 56, 56, 57, 56, + 72, 42, 42, 72, 59, 59, 57 }; #define yyerrok (yyerrstatus = 0) @@ -827,7 +873,7 @@ do \ } \ else \ { \ - yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \ + yyerror (&yylloc, template_, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) @@ -907,7 +953,7 @@ do { \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value, Location, context); \ + Type, Value, Location, template_); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) @@ -921,21 +967,21 @@ do { \ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, QL_parser_context_t *context) +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TRI_query_template_t* const template_) #else static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, template_) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; - QL_parser_context_t *context; + TRI_query_template_t* const template_; #endif { if (!yyvaluep) return; YYUSE (yylocationp); - YYUSE (context); + YYUSE (template_); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); @@ -957,15 +1003,15 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, QL_parser_context_t *context) +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, TRI_query_template_t* const template_) #else static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, template_) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; - QL_parser_context_t *context; + TRI_query_template_t* const template_; #endif { if (yytype < YYNTOKENS) @@ -975,7 +1021,7 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context) YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, template_); YYFPRINTF (yyoutput, ")"); } @@ -1018,14 +1064,14 @@ do { \ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, QL_parser_context_t *context) +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, TRI_query_template_t* const template_) #else static void -yy_reduce_print (yyvsp, yylsp, yyrule, context) +yy_reduce_print (yyvsp, yylsp, yyrule, template_) YYSTYPE *yyvsp; YYLTYPE *yylsp; int yyrule; - QL_parser_context_t *context; + TRI_query_template_t* const template_; #endif { int yynrhs = yyr2[yyrule]; @@ -1039,7 +1085,7 @@ yy_reduce_print (yyvsp, yylsp, yyrule, context) YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , context); + , &(yylsp[(yyi + 1) - (yynrhs)]) , template_); YYFPRINTF (stderr, "\n"); } } @@ -1047,7 +1093,7 @@ yy_reduce_print (yyvsp, yylsp, yyrule, context) # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, context); \ + yy_reduce_print (yyvsp, yylsp, Rule, template_); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that @@ -1298,20 +1344,20 @@ yysyntax_error (char *yyresult, int yystate, int yychar) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, QL_parser_context_t *context) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, TRI_query_template_t* const template_) #else static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, context) +yydestruct (yymsg, yytype, yyvaluep, yylocationp, template_) const char *yymsg; int yytype; YYSTYPE *yyvaluep; YYLTYPE *yylocationp; - QL_parser_context_t *context; + TRI_query_template_t* const template_; #endif { YYUSE (yyvaluep); YYUSE (yylocationp); - YYUSE (context); + YYUSE (template_); if (!yymsg) yymsg = "Deleting"; @@ -1334,7 +1380,7 @@ int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus -int yyparse (QL_parser_context_t *context); +int yyparse (TRI_query_template_t* const template_); #else int yyparse (); #endif @@ -1362,11 +1408,11 @@ yyparse (YYPARSE_PARAM) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int -yyparse (QL_parser_context_t *context) +yyparse (TRI_query_template_t* const template_) #else int -yyparse (context) - QL_parser_context_t *context; +yyparse (template_) + TRI_query_template_t* const template_; #endif #endif { @@ -1648,7 +1694,7 @@ yyreduce: case 2: /* Line 1455 of yacc.c */ -#line 119 "QL/parser.y" +#line 129 "QL/parser.y" { ;} break; @@ -1656,7 +1702,7 @@ yyreduce: case 3: /* Line 1455 of yacc.c */ -#line 121 "QL/parser.y" +#line 131 "QL/parser.y" { ;} break; @@ -1664,7 +1710,7 @@ yyreduce: case 4: /* Line 1455 of yacc.c */ -#line 123 "QL/parser.y" +#line 133 "QL/parser.y" { ;} break; @@ -1672,7 +1718,7 @@ yyreduce: case 5: /* Line 1455 of yacc.c */ -#line 125 "QL/parser.y" +#line 135 "QL/parser.y" { ;} break; @@ -1680,1209 +1726,1547 @@ yyreduce: case 6: /* Line 1455 of yacc.c */ -#line 130 "QL/parser.y" +#line 140 "QL/parser.y" { - context->_query->_type = QLQueryTypeEmpty; + template_->_query->_type = QLQueryTypeEmpty; ;} break; case 7: /* Line 1455 of yacc.c */ -#line 136 "QL/parser.y" +#line 146 "QL/parser.y" { // full blown SELECT query - context->_query->_type = QLQueryTypeSelect; - context->_query->_select._base = (yyvsp[(2) - (6)].node); - context->_query->_from._base = (yyvsp[(3) - (6)].node); - context->_query->_where._base = (yyvsp[(4) - (6)].node); - context->_query->_order._base = (yyvsp[(5) - (6)].node); + template_->_query->_type = QLQueryTypeSelect; + template_->_query->_select._base = (yyvsp[(2) - (6)].node); + template_->_query->_from._base = (yyvsp[(3) - (6)].node); + template_->_query->_where._base = (yyvsp[(4) - (6)].node); + template_->_query->_order._base = (yyvsp[(5) - (6)].node); ;} break; case 8: /* Line 1455 of yacc.c */ -#line 149 "QL/parser.y" +#line 159 "QL/parser.y" { // select part of a SELECT (yyval.node) = (yyvsp[(1) - (1)].node); + ABORT_IF_OOM((yyval.node)); ;} break; case 9: /* Line 1455 of yacc.c */ -#line 156 "QL/parser.y" +#line 167 "QL/parser.y" { // from part of a SELECT - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); ;} break; case 10: /* Line 1455 of yacc.c */ -#line 160 "QL/parser.y" +#line 172 "QL/parser.y" { - (yyval.node) = QLParseContextPop(context); + (yyval.node) = TRI_ParseQueryContextPop(template_); + ABORT_IF_OOM((yyval.node)); ;} break; case 11: /* Line 1455 of yacc.c */ -#line 166 "QL/parser.y" +#line 179 "QL/parser.y" { // single table query - QL_ast_node_t *lhs = (yyvsp[(1) - (1)].node)->_lhs; - QL_ast_node_t *rhs = (yyvsp[(1) - (1)].node)->_rhs; + ABORT_IF_OOM((yyvsp[(1) - (2)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(1) - (2)].node)); - if (lhs != 0 && rhs != 0) { - if (strlen(lhs->_value._stringValue) > QL_QUERY_NAME_LEN || strlen(rhs->_value._stringValue) > QL_QUERY_NAME_LEN) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_INVALID, lhs->_value._stringValue); - YYABORT; - } - if (!QLAstQueryAddCollection(context->_query, lhs->_value._stringValue, rhs->_value._stringValue, true)) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_REDECLARED, rhs->_value._stringValue); + if ((yyvsp[(2) - (2)].node)) { + if (!QLAstQueryAddGeoRestriction(template_->_query, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node))) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_GEO_RESTRICTION_INVALID, ((TRI_query_node_t*) (yyvsp[(2) - (2)].node)->_lhs)->_value._stringValue); YYABORT; } } - - QLParseContextAddElement(context, (yyvsp[(1) - (1)].node)); ;} break; case 12: /* Line 1455 of yacc.c */ -#line 184 "QL/parser.y" +#line 191 "QL/parser.y" { // multi-table query - QL_ast_node_t *lhs = (yyvsp[(3) - (5)].node)->_lhs; - QL_ast_node_t *rhs = (yyvsp[(3) - (5)].node)->_rhs; - - (yyval.node) = (yyvsp[(2) - (5)].node); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(3) - (5)].node); - (yyval.node)->_rhs = (yyvsp[(5) - (5)].node); - } + ABORT_IF_OOM((yyvsp[(2) - (6)].node)); + ABORT_IF_OOM((yyvsp[(3) - (6)].node)); + ABORT_IF_OOM((yyvsp[(6) - (6)].node)); + (yyval.node) = (yyvsp[(2) - (6)].node); + (yyval.node)->_lhs = (yyvsp[(3) - (6)].node); + (yyval.node)->_rhs = (yyvsp[(6) - (6)].node); - if (lhs != 0 && rhs != 0) { - if (strlen(lhs->_value._stringValue) > QL_QUERY_NAME_LEN || strlen(rhs->_value._stringValue) > QL_QUERY_NAME_LEN) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_INVALID, lhs->_value._stringValue); - YYABORT; - } - if (!QLAstQueryAddCollection(context->_query, lhs->_value._stringValue, rhs->_value._stringValue, false)) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_REDECLARED, rhs->_value._stringValue); + if ((yyvsp[(4) - (6)].node)) { + if (!QLAstQueryAddGeoRestriction(template_->_query, (yyvsp[(3) - (6)].node), (yyvsp[(4) - (6)].node))) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_GEO_RESTRICTION_INVALID, ((TRI_query_node_t*) (yyvsp[(4) - (6)].node)->_lhs)->_value._stringValue); YYABORT; } } - QLParseContextAddElement(context, (yyvsp[(2) - (5)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(2) - (6)].node)); ;} break; case 13: /* Line 1455 of yacc.c */ -#line 211 "QL/parser.y" +#line 212 "QL/parser.y" { - (yyval.node) = 0; + ABORT_IF_OOM((yyvsp[(2) - (5)].node)); + ABORT_IF_OOM((yyvsp[(4) - (5)].node)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM((yyval.node)); + + (yyval.node)->_lhs = (yyvsp[(2) - (5)].node); + (yyval.node)->_rhs = (yyvsp[(4) - (5)].node); ;} break; case 14: /* Line 1455 of yacc.c */ -#line 214 "QL/parser.y" +#line 225 "QL/parser.y" { - // where condition set - (yyval.node) = (yyvsp[(2) - (2)].node); + double d; + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNumberDouble); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (1)].strval)); + + d = TRI_DoubleString((yyvsp[(1) - (1)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, (yyvsp[(1) - (1)].strval)); + YYABORT; + } + (yyval.node)->_value._doubleValue = d; ;} break; case 15: /* Line 1455 of yacc.c */ -#line 221 "QL/parser.y" - { - (yyval.node) = 0; +#line 239 "QL/parser.y" + { + double d; + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNumberDouble); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(2) - (2)].strval)); + + d = TRI_DoubleString((yyvsp[(2) - (2)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, (yyvsp[(2) - (2)].strval)); + YYABORT; + } + (yyval.node)->_value._doubleValue = -1.0 * d; ;} break; case 16: /* Line 1455 of yacc.c */ -#line 224 "QL/parser.y" +#line 256 "QL/parser.y" { - // order by part of a query - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 17: /* Line 1455 of yacc.c */ -#line 228 "QL/parser.y" +#line 260 "QL/parser.y" { - (yyval.node) = QLParseContextPop(context); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM((yyval.node)); + + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 18: /* Line 1455 of yacc.c */ -#line 234 "QL/parser.y" +#line 273 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(1) - (1)].node)); + ABORT_IF_OOM((yyvsp[(2) - (5)].node)); + ABORT_IF_OOM((yyvsp[(4) - (5)].node)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = (yyvsp[(2) - (5)].node); + (yyval.node)->_rhs = (yyvsp[(4) - (5)].node); ;} break; case 19: /* Line 1455 of yacc.c */ -#line 237 "QL/parser.y" +#line 285 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(3) - (3)].node)); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); ;} break; case 20: /* Line 1455 of yacc.c */ -#line 243 "QL/parser.y" +#line 289 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeContainerOrderElement); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (2)].node); - (yyval.node)->_rhs = (yyvsp[(2) - (2)].node); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + TRI_ParseQueryPopIntoRhs((yyval.node), template_); ;} break; case 21: /* Line 1455 of yacc.c */ -#line 253 "QL/parser.y" +#line 299 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueOrderDirection); - if ((yyval.node) != 0) { - (yyval.node)->_value._boolValue = true; - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 22: /* Line 1455 of yacc.c */ -#line 259 "QL/parser.y" +#line 303 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueOrderDirection); - if ((yyval.node) != 0) { - (yyval.node)->_value._boolValue = true; - } + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 23: /* Line 1455 of yacc.c */ -#line 265 "QL/parser.y" +#line 315 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueOrderDirection); - if ((yyval.node) != 0) { - (yyval.node)->_value._boolValue = false; - } + (yyval.node) = 0; ;} break; case 24: /* Line 1455 of yacc.c */ -#line 274 "QL/parser.y" +#line 318 "QL/parser.y" { + TRI_query_node_t* comp; + double distance; + + ABORT_IF_OOM((yyvsp[(2) - (10)].node)); + ABORT_IF_OOM((yyvsp[(5) - (10)].node)); + ABORT_IF_OOM((yyvsp[(7) - (10)].node)); + ABORT_IF_OOM((yyvsp[(9) - (10)].strval)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeRestrictWithin); + ABORT_IF_OOM((yyval.node)); + + distance = TRI_DoubleString((yyvsp[(9) - (10)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, (yyvsp[(9) - (10)].strval)); + YYABORT; + } + (yyval.node)->_value._doubleValue = distance; + + comp = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerCoordinatePair); + ABORT_IF_OOM(comp); + comp->_lhs = (yyvsp[(5) - (10)].node); + comp->_rhs = (yyvsp[(7) - (10)].node); + + (yyval.node)->_lhs = (yyvsp[(2) - (10)].node); + (yyval.node)->_rhs = comp; ;} break; case 25: /* Line 1455 of yacc.c */ -#line 276 "QL/parser.y" +#line 345 "QL/parser.y" { - // limit value - int64_t d = TRI_Int64String((yyvsp[(2) - (2)].strval)); + TRI_query_node_t* comp; + int64_t num; + + ABORT_IF_OOM((yyvsp[(2) - (10)].node)); + ABORT_IF_OOM((yyvsp[(5) - (10)].node)); + ABORT_IF_OOM((yyvsp[(7) - (10)].node)); + ABORT_IF_OOM((yyvsp[(9) - (10)].strval)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeRestrictNear); + ABORT_IF_OOM((yyval.node)); + num = TRI_Int64String((yyvsp[(9) - (10)].strval)); if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(2) - (2)].strval)); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(9) - (10)].strval)); YYABORT; } - - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = 0; - context->_query->_limit._count = d; + (yyval.node)->_value._intValue = num; + + comp = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerCoordinatePair); + ABORT_IF_OOM(comp); + comp->_lhs = (yyvsp[(5) - (10)].node); + comp->_rhs = (yyvsp[(7) - (10)].node); + + (yyval.node)->_lhs = (yyvsp[(2) - (10)].node); + (yyval.node)->_rhs = comp; ;} break; case 26: /* Line 1455 of yacc.c */ -#line 289 "QL/parser.y" +#line 379 "QL/parser.y" { - // limit - value - int64_t d = TRI_Int64String((yyvsp[(3) - (3)].strval)); - - if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(3) - (3)].strval)); - YYABORT; - } - - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = 0; - context->_query->_limit._count = -d; + (yyval.node) = 0; ;} break; case 27: /* Line 1455 of yacc.c */ -#line 302 "QL/parser.y" - { - // limit value, value - int64_t d1, d2; - - d1 = TRI_Int64String((yyvsp[(2) - (4)].strval)); - if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(2) - (4)].strval)); - YYABORT; - } - - d2 = TRI_Int64String((yyvsp[(4) - (4)].strval)); - if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(4) - (4)].strval)); - YYABORT; - } - - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = d1; - context->_query->_limit._count = d2; +#line 382 "QL/parser.y" + { + // where condition set + ABORT_IF_OOM((yyvsp[(2) - (2)].node)); + (yyval.node) = (yyvsp[(2) - (2)].node); ;} break; case 28: /* Line 1455 of yacc.c */ -#line 322 "QL/parser.y" - { - // limit value, -value - int64_t d1, d2; - - d1 = TRI_Int64String((yyvsp[(2) - (5)].strval)); - if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(2) - (5)].strval)); - YYABORT; - } - - d2 = TRI_Int64String((yyvsp[(5) - (5)].strval)); - if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(5) - (5)].strval)); - YYABORT; - } - - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = d1; - context->_query->_limit._count = -d2; +#line 390 "QL/parser.y" + { + (yyval.node) = 0; ;} break; case 29: /* Line 1455 of yacc.c */ -#line 345 "QL/parser.y" +#line 393 "QL/parser.y" { - // document is a reference to a collection (by using its alias) - (yyval.node) = (yyvsp[(1) - (1)].node); + // order by part of a query + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); ;} break; case 30: /* Line 1455 of yacc.c */ -#line 349 "QL/parser.y" +#line 398 "QL/parser.y" { - // empty document - (yyval.node) = QLAstNodeCreate(context,QLNodeValueDocument); + (yyval.node) = TRI_ParseQueryContextPop(template_); + ABORT_IF_OOM((yyval.node)); ;} break; case 31: /* Line 1455 of yacc.c */ -#line 353 "QL/parser.y" +#line 405 "QL/parser.y" { - // listing of document attributes - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(1) - (1)].node)); ;} break; case 32: /* Line 1455 of yacc.c */ -#line 357 "QL/parser.y" +#line 409 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueDocument); - QLPopIntoRhs((yyval.node), context); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(3) - (3)].node)); ;} break; case 33: /* Line 1455 of yacc.c */ -#line 364 "QL/parser.y" +#line 416 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(1) - (1)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerOrderElement); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (2)].node)); + ABORT_IF_OOM((yyvsp[(2) - (2)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (2)].node); + (yyval.node)->_rhs = (yyvsp[(2) - (2)].node); ;} break; case 34: /* Line 1455 of yacc.c */ -#line 367 "QL/parser.y" +#line 427 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueOrderDirection); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_value._boolValue = true; ;} break; case 35: /* Line 1455 of yacc.c */ -#line 373 "QL/parser.y" +#line 432 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueOrderDirection); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_value._boolValue = true; ;} break; case 36: /* Line 1455 of yacc.c */ -#line 379 "QL/parser.y" +#line 437 "QL/parser.y" { - QL_ast_node_t *identifier = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (identifier != 0) { - identifier->_value._stringValue = (yyvsp[(1) - (3)].strval); - } - - (yyval.node) = QLAstNodeCreate(context,QLNodeValueNamedValue); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = identifier; - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueOrderDirection); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_value._boolValue = false; ;} break; case 37: /* Line 1455 of yacc.c */ -#line 391 "QL/parser.y" +#line 445 "QL/parser.y" { - size_t outLength; - QL_ast_node_t *str = QLAstNodeCreate(context,QLNodeValueString); - if (str) { - str->_value._stringValue = QLParseRegisterString(context, TRI_UnescapeUtf8String((yyvsp[(1) - (3)].strval) + 1, strlen((yyvsp[(1) - (3)].strval)) - 2, &outLength)); - } - - (yyval.node) = QLAstNodeCreate(context,QLNodeValueNamedValue); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = str; - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } ;} break; case 38: /* Line 1455 of yacc.c */ -#line 407 "QL/parser.y" +#line 447 "QL/parser.y" { - QL_ast_node_t *name; + // limit value + int64_t d = TRI_Int64String((yyvsp[(2) - (2)].strval)); - (yyval.node) = QLAstNodeCreate(context,QLNodeReferenceCollection); - if ((yyval.node) != 0) { - name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = (yyvsp[(1) - (2)].strval); - } - (yyval.node)->_lhs = name; - (yyval.node)->_rhs = (yyvsp[(2) - (2)].node); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(2) - (2)].strval)); + YYABORT; } + + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = 0; + template_->_query->_limit._count = d; ;} break; case 39: /* Line 1455 of yacc.c */ -#line 423 "QL/parser.y" +#line 460 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeReferenceCollectionAlias); - if ((yyval.node) != 0) { - (yyval.node)->_value._stringValue = (yyvsp[(1) - (1)].strval); + // limit - value + int64_t d = TRI_Int64String((yyvsp[(3) - (3)].strval)); + + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(3) - (3)].strval)); + YYABORT; } + + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = 0; + template_->_query->_limit._count = -d; ;} break; case 40: /* Line 1455 of yacc.c */ -#line 432 "QL/parser.y" - { - (yyval.node) = (yyvsp[(1) - (1)].node); +#line 473 "QL/parser.y" + { + // limit value, value + int64_t d1, d2; + + d1 = TRI_Int64String((yyvsp[(2) - (4)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(2) - (4)].strval)); + YYABORT; + } + + d2 = TRI_Int64String((yyvsp[(4) - (4)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(4) - (4)].strval)); + YYABORT; + } + + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = d1; + template_->_query->_limit._count = d2; ;} break; case 41: /* Line 1455 of yacc.c */ -#line 435 "QL/parser.y" - { - (yyval.node) = (yyvsp[(1) - (1)].node); +#line 493 "QL/parser.y" + { + // limit value, -value + int64_t d1, d2; + + d1 = TRI_Int64String((yyvsp[(2) - (5)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(2) - (5)].strval)); + YYABORT; + } + + d2 = TRI_Int64String((yyvsp[(5) - (5)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, (yyvsp[(5) - (5)].strval)); + YYABORT; + } + + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = d1; + template_->_query->_limit._count = -d2; ;} break; case 42: /* Line 1455 of yacc.c */ -#line 438 "QL/parser.y" +#line 516 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + // document is a reference to a collection (by using its alias) + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 43: /* Line 1455 of yacc.c */ -#line 444 "QL/parser.y" +#line 521 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeJoinList); + // empty document + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueDocument); + ABORT_IF_OOM((yyval.node)); ;} break; case 44: /* Line 1455 of yacc.c */ -#line 450 "QL/parser.y" +#line 526 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeJoinInner); + // listing of document attributes + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); ;} break; case 45: /* Line 1455 of yacc.c */ -#line 453 "QL/parser.y" +#line 531 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeJoinInner); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueDocument); + ABORT_IF_OOM((yyval.node)); + TRI_ParseQueryPopIntoRhs((yyval.node), template_); ;} break; case 46: /* Line 1455 of yacc.c */ -#line 459 "QL/parser.y" +#line 539 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeJoinLeft); + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(1) - (1)].node)); ;} break; case 47: /* Line 1455 of yacc.c */ -#line 462 "QL/parser.y" +#line 543 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeJoinLeft); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(3) - (3)].node)); ;} break; case 48: /* Line 1455 of yacc.c */ -#line 468 "QL/parser.y" +#line 550 "QL/parser.y" { - (yyval.node) = (yyvsp[(2) - (3)].node); + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 49: /* Line 1455 of yacc.c */ -#line 471 "QL/parser.y" +#line 557 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + size_t outLength; + TRI_query_node_t* str = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueString); + ABORT_IF_OOM(str); + ABORT_IF_OOM((yyvsp[(1) - (3)].strval)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + str->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String((yyvsp[(1) - (3)].strval), strlen((yyvsp[(1) - (3)].strval)), &outLength)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNamedValue); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = str; + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 50: /* Line 1455 of yacc.c */ -#line 474 "QL/parser.y" +#line 570 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + size_t outLength; + TRI_query_node_t* str = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueString); + ABORT_IF_OOM(str); + ABORT_IF_OOM((yyvsp[(1) - (3)].strval)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + str->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String((yyvsp[(1) - (3)].strval) + 1, strlen((yyvsp[(1) - (3)].strval)) - 2, &outLength)); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNamedValue); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = str; + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 51: /* Line 1455 of yacc.c */ -#line 477 "QL/parser.y" +#line 586 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + ABORT_IF_OOM((yyvsp[(1) - (2)].node)); + ABORT_IF_OOM((yyvsp[(1) - (2)].node)->_value._stringValue); + ABORT_IF_OOM((yyvsp[(2) - (2)].node)); + ABORT_IF_OOM((yyvsp[(2) - (2)].node)->_value._stringValue); + + if (!TRI_ParseQueryValidateCollectionName((yyvsp[(1) - (2)].node)->_value._stringValue)) { + // validate collection name + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_COLLECTION_NAME_INVALID, (yyvsp[(1) - (2)].node)->_value._stringValue); + YYABORT; + } + + if (!TRI_ParseQueryValidateCollectionAlias((yyvsp[(2) - (2)].node)->_value._stringValue)) { + // validate alias + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_COLLECTION_ALIAS_INVALID, (yyvsp[(2) - (2)].node)->_value._stringValue); + YYABORT; + } + + if (!QLAstQueryAddCollection(template_->_query, (yyvsp[(1) - (2)].node)->_value._stringValue, (yyvsp[(2) - (2)].node)->_value._stringValue)) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_COLLECTION_ALIAS_REDECLARED, (yyvsp[(2) - (2)].node)->_value._stringValue); + YYABORT; + } + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeReferenceCollection); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = (yyvsp[(1) - (2)].node); + (yyval.node)->_rhs = (yyvsp[(2) - (2)].node); ;} break; case 52: /* Line 1455 of yacc.c */ -#line 480 "QL/parser.y" +#line 618 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (1)].strval)); + (yyval.node)->_value._stringValue = (yyvsp[(1) - (1)].strval); ;} break; case 53: /* Line 1455 of yacc.c */ -#line 483 "QL/parser.y" - { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); +#line 624 "QL/parser.y" + { + size_t outLength; + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (1)].strval)); + (yyval.node)->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String((yyvsp[(1) - (1)].strval) + 1, strlen((yyvsp[(1) - (1)].strval)) - 2, &outLength)); ;} break; case 54: /* Line 1455 of yacc.c */ -#line 486 "QL/parser.y" +#line 634 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context, QLNodeContainerMemberAccess); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - QLPopIntoRhs((yyval.node), context); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeReferenceCollectionAlias); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (1)].strval)); + (yyval.node)->_value._stringValue = (yyvsp[(1) - (1)].strval); ;} break; case 55: /* Line 1455 of yacc.c */ -#line 493 "QL/parser.y" +#line 640 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + size_t outLength; + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeReferenceCollectionAlias); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (1)].strval)); + (yyval.node)->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String((yyvsp[(1) - (1)].strval) + 1, strlen((yyvsp[(1) - (1)].strval)) - 2, &outLength)); ;} break; case 56: /* Line 1455 of yacc.c */ -#line 496 "QL/parser.y" +#line 650 "QL/parser.y" { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 57: /* Line 1455 of yacc.c */ -#line 499 "QL/parser.y" +#line 654 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context, QLNodeContainerMemberAccess); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - QLPopIntoRhs((yyval.node), context); - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 58: /* Line 1455 of yacc.c */ -#line 506 "QL/parser.y" +#line 658 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 59: /* Line 1455 of yacc.c */ -#line 509 "QL/parser.y" +#line 665 "QL/parser.y" { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinList); + ABORT_IF_OOM((yyval.node)); ;} break; case 60: /* Line 1455 of yacc.c */ -#line 512 "QL/parser.y" +#line 672 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context, QLNodeContainerMemberAccess); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - QLPopIntoRhs((yyval.node), context); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinInner); + ABORT_IF_OOM((yyval.node)); ;} break; case 61: /* Line 1455 of yacc.c */ -#line 519 "QL/parser.y" +#line 676 "QL/parser.y" { - (yyval.node) = (yyvsp[(1) - (1)].node); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinInner); + ABORT_IF_OOM((yyval.node)); ;} break; case 62: /* Line 1455 of yacc.c */ -#line 526 "QL/parser.y" +#line 683 "QL/parser.y" { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = (yyvsp[(2) - (2)].strval); - QLParseContextAddElement(context, name); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinLeft); + ABORT_IF_OOM((yyval.node)); ;} break; case 63: /* Line 1455 of yacc.c */ -#line 533 "QL/parser.y" +#line 687 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(2) - (2)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinLeft); + ABORT_IF_OOM((yyval.node)); ;} break; case 64: /* Line 1455 of yacc.c */ -#line 536 "QL/parser.y" +#line 691 "QL/parser.y" { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = (yyvsp[(3) - (3)].strval); - QLParseContextAddElement(context, name); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinRight); + ABORT_IF_OOM((yyval.node)); ;} break; case 65: /* Line 1455 of yacc.c */ -#line 543 "QL/parser.y" +#line 695 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinRight); + ABORT_IF_OOM((yyval.node)); ;} break; case 66: /* Line 1455 of yacc.c */ -#line 549 "QL/parser.y" +#line 702 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeUnaryOperatorPlus); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(2) - (2)].node); - } + ABORT_IF_OOM((yyvsp[(2) - (3)].node)); + (yyval.node) = (yyvsp[(2) - (3)].node); ;} break; case 67: /* Line 1455 of yacc.c */ -#line 555 "QL/parser.y" +#line 706 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeUnaryOperatorMinus); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(2) - (2)].node); - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 68: /* Line 1455 of yacc.c */ -#line 561 "QL/parser.y" - { - (yyval.node) = QLAstNodeCreate(context,QLNodeUnaryOperatorNot); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(2) - (2)].node); - } +#line 710 "QL/parser.y" + { + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 69: /* Line 1455 of yacc.c */ -#line 570 "QL/parser.y" +#line 714 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorOr); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 70: /* Line 1455 of yacc.c */ -#line 577 "QL/parser.y" +#line 718 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorAnd); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 71: /* Line 1455 of yacc.c */ -#line 584 "QL/parser.y" - { - (yyval.node) = QLAstNodeCreate(context, QLNodeBinaryOperatorAdd); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } +#line 722 "QL/parser.y" + { + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); ;} break; case 72: /* Line 1455 of yacc.c */ -#line 591 "QL/parser.y" +#line 726 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorSubtract); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + TRI_ParseQueryPopIntoRhs((yyval.node), template_); ;} break; case 73: /* Line 1455 of yacc.c */ -#line 598 "QL/parser.y" +#line 733 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorMultiply); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 74: /* Line 1455 of yacc.c */ -#line 605 "QL/parser.y" +#line 737 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorDivide); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); ;} break; case 75: /* Line 1455 of yacc.c */ -#line 612 "QL/parser.y" +#line 741 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorModulus); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + TRI_ParseQueryPopIntoRhs((yyval.node), template_); ;} break; case 76: /* Line 1455 of yacc.c */ -#line 619 "QL/parser.y" +#line 748 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorIdentical); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 77: /* Line 1455 of yacc.c */ -#line 626 "QL/parser.y" +#line 752 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorUnidentical); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); ;} break; case 78: /* Line 1455 of yacc.c */ -#line 633 "QL/parser.y" +#line 756 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorEqual); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + TRI_ParseQueryPopIntoRhs((yyval.node), template_); ;} break; case 79: /* Line 1455 of yacc.c */ -#line 640 "QL/parser.y" +#line 763 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorUnequal); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); ;} break; case 80: /* Line 1455 of yacc.c */ -#line 647 "QL/parser.y" +#line 771 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorLess); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM((yyvsp[(2) - (2)].strval)); + name->_value._stringValue = (yyvsp[(2) - (2)].strval); + TRI_ParseQueryContextAddElement(template_, name); ;} break; case 81: /* Line 1455 of yacc.c */ -#line 654 "QL/parser.y" +#line 778 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorGreater); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + ABORT_IF_OOM((yyvsp[(2) - (2)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(2) - (2)].node)); ;} break; case 82: /* Line 1455 of yacc.c */ -#line 661 "QL/parser.y" +#line 782 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorLessEqual); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM((yyvsp[(3) - (3)].strval)); + name->_value._stringValue = (yyvsp[(3) - (3)].strval); + TRI_ParseQueryContextAddElement(template_, name); ;} break; case 83: /* Line 1455 of yacc.c */ -#line 668 "QL/parser.y" +#line 789 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeBinaryOperatorGreaterEqual); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(3) - (3)].node)); ;} break; case 84: /* Line 1455 of yacc.c */ -#line 675 "QL/parser.y" +#line 797 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context, QLNodeBinaryOperatorIn); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); - (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeUnaryOperatorPlus); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(2) - (2)].node)); + (yyval.node)->_lhs = (yyvsp[(2) - (2)].node); ;} break; case 85: /* Line 1455 of yacc.c */ -#line 685 "QL/parser.y" +#line 803 "QL/parser.y" { - QL_ast_node_t *node = QLAstNodeCreate(context, QLNodeContainerTernarySwitch); - if (node) { - node->_lhs = (yyvsp[(3) - (5)].node); - node->_rhs = (yyvsp[(5) - (5)].node); - } - (yyval.node) = QLAstNodeCreate(context, QLNodeControlTernary); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = (yyvsp[(1) - (5)].node); - (yyval.node)->_rhs = node; - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeUnaryOperatorMinus); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(2) - (2)].node)); + (yyval.node)->_lhs = (yyvsp[(2) - (2)].node); ;} break; case 86: /* Line 1455 of yacc.c */ -#line 700 "QL/parser.y" - { - (yyval.node) = (yyvsp[(1) - (1)].node); +#line 809 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeUnaryOperatorNot); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(2) - (2)].node)); + (yyval.node)->_lhs = (yyvsp[(2) - (2)].node); ;} break; case 87: /* Line 1455 of yacc.c */ -#line 706 "QL/parser.y" +#line 818 "QL/parser.y" { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = (yyvsp[(1) - (3)].strval); - } - - (yyval.node) = QLAstNodeCreate(context,QLNodeControlFunctionCall); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = name; - (yyval.node)->_rhs = QLAstNodeCreate(context,QLNodeContainerList); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorOr); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 88: /* Line 1455 of yacc.c */ -#line 718 "QL/parser.y" +#line 826 "QL/parser.y" { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorAnd); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 89: /* Line 1455 of yacc.c */ -#line 721 "QL/parser.y" +#line 834 "QL/parser.y" { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = (yyvsp[(1) - (5)].strval); - } - - (yyval.node) = QLAstNodeCreate(context,QLNodeControlFunctionCall); - if ((yyval.node) != 0) { - (yyval.node)->_lhs = name; - QLPopIntoRhs((yyval.node), context); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorAdd); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 90: /* Line 1455 of yacc.c */ -#line 736 "QL/parser.y" +#line 842 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(1) - (1)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorSubtract); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 91: /* Line 1455 of yacc.c */ -#line 739 "QL/parser.y" +#line 850 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorMultiply); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 92: /* Line 1455 of yacc.c */ -#line 745 "QL/parser.y" +#line 858 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueArray); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorDivide); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 93: /* Line 1455 of yacc.c */ -#line 748 "QL/parser.y" +#line 866 "QL/parser.y" { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorModulus); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 94: /* Line 1455 of yacc.c */ -#line 751 "QL/parser.y" - { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueArray); - if ((yyval.node) != 0) { - QLPopIntoRhs((yyval.node), context); - } +#line 874 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorIdentical); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 95: /* Line 1455 of yacc.c */ -#line 760 "QL/parser.y" +#line 882 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(1) - (1)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorUnidentical); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 96: /* Line 1455 of yacc.c */ -#line 763 "QL/parser.y" +#line 890 "QL/parser.y" { - QLParseContextAddElement(context, (yyvsp[(3) - (3)].node)); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorEqual); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 97: /* Line 1455 of yacc.c */ -#line 769 "QL/parser.y" +#line 898 "QL/parser.y" { - size_t outLength; - (yyval.node) = QLAstNodeCreate(context,QLNodeValueString); - if ((yyval.node) != 0) { - (yyval.node)->_value._stringValue = QLParseRegisterString(context, TRI_UnescapeUtf8String((yyvsp[(1) - (1)].strval) + 1, strlen((yyvsp[(1) - (1)].strval)) - 2, &outLength)); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorUnequal); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 98: /* Line 1455 of yacc.c */ -#line 776 "QL/parser.y" +#line 906 "QL/parser.y" { - double d = TRI_DoubleString((yyvsp[(1) - (1)].strval)); - if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { - QLParseRegisterParseError(context, ERR_NUMBER_OUT_OF_RANGE, (yyvsp[(1) - (1)].strval)); - YYABORT; - } - (yyval.node) = QLAstNodeCreate(context,QLNodeValueNumberDoubleString); - if ((yyval.node) != 0) { - (yyval.node)->_value._stringValue = (yyvsp[(1) - (1)].strval); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorLess); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 99: /* Line 1455 of yacc.c */ -#line 787 "QL/parser.y" +#line 914 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueNull); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorGreater); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 100: /* Line 1455 of yacc.c */ -#line 790 "QL/parser.y" +#line 922 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueUndefined); + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorLessEqual); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 101: /* Line 1455 of yacc.c */ -#line 793 "QL/parser.y" - { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueBool); - if ((yyval.node) != 0) { - (yyval.node)->_value._boolValue = true; - } +#line 930 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorGreaterEqual); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 102: /* Line 1455 of yacc.c */ -#line 799 "QL/parser.y" +#line 938 "QL/parser.y" { - (yyval.node) = QLAstNodeCreate(context,QLNodeValueBool); - if ((yyval.node) != 0) { - (yyval.node)->_value._boolValue = false; - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorIn); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (3)].node)); + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + (yyval.node)->_lhs = (yyvsp[(1) - (3)].node); + (yyval.node)->_rhs = (yyvsp[(3) - (3)].node); ;} break; case 103: /* Line 1455 of yacc.c */ -#line 805 "QL/parser.y" +#line 949 "QL/parser.y" { - // numbered parameter - int64_t d = TRI_Int64String((yyvsp[(1) - (1)].strval)); + TRI_query_node_t* node = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerTernarySwitch); + ABORT_IF_OOM(node); + ABORT_IF_OOM((yyvsp[(1) - (5)].node)); + ABORT_IF_OOM((yyvsp[(3) - (5)].node)); + ABORT_IF_OOM((yyvsp[(5) - (5)].node)); + node->_lhs = (yyvsp[(3) - (5)].node); + node->_rhs = (yyvsp[(5) - (5)].node); - if (TRI_errno() != TRI_ERROR_NO_ERROR || d < 0 || d >= 256) { - QLParseRegisterParseError(context, ERR_PARAMETER_NUMBER_OUT_OF_RANGE, (yyvsp[(1) - (1)].strval)); - YYABORT; - } - - (yyval.node) = QLAstNodeCreate(context,QLNodeValueParameterNumeric); - if ((yyval.node) != 0) { - (yyval.node)->_value._intValue = d; - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeControlTernary); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = (yyvsp[(1) - (5)].node); + (yyval.node)->_rhs = node; ;} break; case 104: /* Line 1455 of yacc.c */ -#line 819 "QL/parser.y" +#line 966 "QL/parser.y" + { + ABORT_IF_OOM((yyvsp[(1) - (1)].node)); + (yyval.node) = (yyvsp[(1) - (1)].node); + ;} + break; + + case 105: + +/* Line 1455 of yacc.c */ +#line 973 "QL/parser.y" + { + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM((yyvsp[(1) - (3)].strval)); + name->_value._stringValue = (yyvsp[(1) - (3)].strval); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeControlFunctionCall); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = name; + (yyval.node)->_rhs = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM((yyval.node)->_rhs); + ;} + break; + + case 106: + +/* Line 1455 of yacc.c */ +#line 985 "QL/parser.y" + { + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); + ;} + break; + + case 107: + +/* Line 1455 of yacc.c */ +#line 989 "QL/parser.y" + { + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM((yyvsp[(1) - (5)].strval)); + name->_value._stringValue = (yyvsp[(1) - (5)].strval); + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeControlFunctionCall); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_lhs = name; + TRI_ParseQueryPopIntoRhs((yyval.node), template_); + ;} + break; + + case 108: + +/* Line 1455 of yacc.c */ +#line 1003 "QL/parser.y" + { + TRI_ParseQueryContextAddElement(template_, (yyvsp[(1) - (1)].node)); + ;} + break; + + case 109: + +/* Line 1455 of yacc.c */ +#line 1006 "QL/parser.y" + { + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(3) - (3)].node)); + ;} + break; + + case 110: + +/* Line 1455 of yacc.c */ +#line 1013 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueArray); + ABORT_IF_OOM((yyval.node)); + ;} + break; + + case 111: + +/* Line 1455 of yacc.c */ +#line 1017 "QL/parser.y" + { + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); + ;} + break; + + case 112: + +/* Line 1455 of yacc.c */ +#line 1021 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueArray); + ABORT_IF_OOM((yyval.node)); + TRI_ParseQueryPopIntoRhs((yyval.node), template_); + ;} + break; + + case 113: + +/* Line 1455 of yacc.c */ +#line 1029 "QL/parser.y" + { + TRI_ParseQueryContextAddElement(template_, (yyvsp[(1) - (1)].node)); + ;} + break; + + case 114: + +/* Line 1455 of yacc.c */ +#line 1032 "QL/parser.y" + { + ABORT_IF_OOM((yyvsp[(3) - (3)].node)); + TRI_ParseQueryContextAddElement(template_, (yyvsp[(3) - (3)].node)); + ;} + break; + + case 115: + +/* Line 1455 of yacc.c */ +#line 1039 "QL/parser.y" + { + size_t outLength; + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueString); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (1)].strval)); + (yyval.node)->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String((yyvsp[(1) - (1)].strval) + 1, strlen((yyvsp[(1) - (1)].strval)) - 2, &outLength)); + ;} + break; + + case 116: + +/* Line 1455 of yacc.c */ +#line 1046 "QL/parser.y" + { + double d = TRI_DoubleString((yyvsp[(1) - (1)].strval)); + if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, (yyvsp[(1) - (1)].strval)); + YYABORT; + } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNumberDoubleString); + ABORT_IF_OOM((yyval.node)); + ABORT_IF_OOM((yyvsp[(1) - (1)].strval)); + (yyval.node)->_value._stringValue = (yyvsp[(1) - (1)].strval); + ;} + break; + + case 117: + +/* Line 1455 of yacc.c */ +#line 1057 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNull); + ABORT_IF_OOM((yyval.node)); + ;} + break; + + case 118: + +/* Line 1455 of yacc.c */ +#line 1061 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueUndefined); + ABORT_IF_OOM((yyval.node)); + ;} + break; + + case 119: + +/* Line 1455 of yacc.c */ +#line 1065 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueBool); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_value._boolValue = true; + ;} + break; + + case 120: + +/* Line 1455 of yacc.c */ +#line 1070 "QL/parser.y" + { + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueBool); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_value._boolValue = false; + ;} + break; + + case 121: + +/* Line 1455 of yacc.c */ +#line 1075 "QL/parser.y" + { + // numbered parameter + int64_t d = TRI_Int64String((yyvsp[(1) - (1)].strval)); + + if (TRI_errno() != TRI_ERROR_NO_ERROR || d < 0 || d >= 256) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_BIND_PARAMETER_NUMBER_OUT_OF_RANGE, (yyvsp[(1) - (1)].strval)); + YYABORT; + } + + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueParameterNumeric); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_value._intValue = d; + ;} + break; + + case 122: + +/* Line 1455 of yacc.c */ +#line 1088 "QL/parser.y" { // named parameter - (yyval.node) = QLAstNodeCreate(context,QLNodeValueParameterNamed); - if ((yyval.node) != 0) { - (yyval.node)->_value._stringValue = (yyvsp[(1) - (1)].strval); - } + (yyval.node) = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueParameterNamed); + ABORT_IF_OOM((yyval.node)); + (yyval.node)->_value._stringValue = (yyvsp[(1) - (1)].strval); ;} break; /* Line 1455 of yacc.c */ -#line 2886 "QL/parser.c" +#line 3270 "QL/parser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2918,7 +3302,7 @@ yyerrlab: { ++yynerrs; #if ! YYERROR_VERBOSE - yyerror (&yylloc, context, YY_("syntax error")); + yyerror (&yylloc, template_, YY_("syntax error")); #else { YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); @@ -2942,11 +3326,11 @@ yyerrlab: if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (&yylloc, context, yymsg); + yyerror (&yylloc, template_, yymsg); } else { - yyerror (&yylloc, context, YY_("syntax error")); + yyerror (&yylloc, template_, YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } @@ -2970,7 +3354,7 @@ yyerrlab: else { yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, context); + yytoken, &yylval, &yylloc, template_); yychar = YYEMPTY; } } @@ -3027,7 +3411,7 @@ yyerrlab1: yyerror_range[0] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, context); + yystos[yystate], yyvsp, yylsp, template_); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -3067,7 +3451,7 @@ yyabortlab: | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: - yyerror (&yylloc, context, YY_("memory exhausted")); + yyerror (&yylloc, template_, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif @@ -3075,7 +3459,7 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, context); + yytoken, &yylval, &yylloc, template_); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -3083,7 +3467,7 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, context); + yystos[*yyssp], yyvsp, yylsp, template_); YYPOPSTACK (1); } #ifndef yyoverflow @@ -3101,7 +3485,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 828 "QL/parser.y" +#line 1096 "QL/parser.y" diff --git a/QL/parser.h b/QL/parser.h index d5b429a91c..0098d0bb71 100644 --- a/QL/parser.h +++ b/QL/parser.h @@ -53,35 +53,38 @@ BY = 269, ASC = 270, DESC = 271, - LIMIT = 272, - AND = 273, - OR = 274, - NOT = 275, - IN = 276, - ASSIGNMENT = 277, - GREATER = 278, - LESS = 279, - GREATER_EQUAL = 280, - LESS_EQUAL = 281, - EQUAL = 282, - UNEQUAL = 283, - IDENTICAL = 284, - UNIDENTICAL = 285, - NULLX = 286, - TRUE = 287, - FALSE = 288, - UNDEFINED = 289, - IDENTIFIER = 290, - PARAMETER = 291, - PARAMETER_NAMED = 292, - STRING = 293, - REAL = 294, - COLON = 295, - TERNARY = 296, - FCALL = 297, - UPLUS = 298, - UMINUS = 299, - MEMBER = 300 + WITHIN = 272, + NEAR = 273, + LIMIT = 274, + AND = 275, + OR = 276, + NOT = 277, + IN = 278, + ASSIGNMENT = 279, + GREATER = 280, + LESS = 281, + GREATER_EQUAL = 282, + LESS_EQUAL = 283, + EQUAL = 284, + UNEQUAL = 285, + IDENTICAL = 286, + UNIDENTICAL = 287, + NULLX = 288, + TRUE = 289, + FALSE = 290, + UNDEFINED = 291, + IDENTIFIER = 292, + QUOTED_IDENTIFIER = 293, + PARAMETER = 294, + PARAMETER_NAMED = 295, + STRING = 296, + REAL = 297, + COLON = 298, + TERNARY = 299, + FCALL = 300, + UPLUS = 301, + UMINUS = 302, + MEMBER = 303 }; #endif @@ -92,9 +95,9 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 27 "QL/parser.y" +#line 32 "QL/parser.y" - QL_ast_node_t *node; + TRI_query_node_t* node; int intval; double floatval; char *strval; @@ -102,7 +105,7 @@ typedef union YYSTYPE /* Line 1676 of yacc.c */ -#line 106 "QL/parser.h" +#line 109 "QL/parser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/QL/parser.y b/QL/parser.y index b3ef9b6ad8..0e973c2c44 100644 --- a/QL/parser.y +++ b/QL/parser.y @@ -3,29 +3,34 @@ %name-prefix="QL" %locations %defines -%parse-param { QL_parser_context_t *context } -%lex-param { void *scanner } +%parse-param { TRI_query_template_t* const template_ } +%lex-param { void* scanner } %error-verbose %{ #include #include -#include #include #include #include -#include "QL/ast-node.h" -#include "QL/parser-context.h" -#include "QL/formatter.h" -#include "QL/error.h" +#include "VocBase/query-node.h" +#include "VocBase/query-base.h" +#include "VocBase/query-parse.h" +#include "VocBase/query-error.h" + +#define ABORT_IF_OOM(ptr) \ + if (!ptr) { \ + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_OOM, NULL); \ + YYABORT; \ + } %} %union { - QL_ast_node_t *node; + TRI_query_node_t* node; int intval; double floatval; char *strval; @@ -33,23 +38,19 @@ %{ -int QLlex (YYSTYPE *,YYLTYPE *, void *); +int QLlex (YYSTYPE*, YYLTYPE*, void*); -void QLerror (YYLTYPE *locp,QL_parser_context_t *context, const char *err) { - context->_lexState._errorState._code = ERR_PARSE; - context->_lexState._errorState._message = QLParseAllocString(context, (char *) err); - context->_lexState._errorState._line = locp->first_line; - context->_lexState._errorState._column = locp->first_column; +void QLerror (YYLTYPE* locp, TRI_query_template_t* const template_, const char* err) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_PARSE, err); } - - -#define scanner context->_scanner +#define scanner template_->_parser->_scanner %} %type STRING %type REAL %type IDENTIFIER; +%type QUOTED_IDENTIFIER; %type PARAMETER; %type PARAMETER_NAMED; @@ -65,8 +66,16 @@ void QLerror (YYLTYPE *locp,QL_parser_context_t *context, const char *err) { %type list_join; %type inner_join; %type outer_join; -%type collection_alias; %type collection_reference; +%type collection_name; +%type collection_alias; +%type geo_restriction; +%type geo_reference; +%type geo_1dreference; +%type geo_2dreference; +%type geo_value; +%type geo_1dvalue; +%type geo_2dvalue; %type where_clause; %type order_clause; %type order_list; @@ -89,11 +98,12 @@ void QLerror (YYLTYPE *locp,QL_parser_context_t *context, const char *err) { %token WHERE %token JOIN LIST INNER OUTER LEFT RIGHT ON %token ORDER BY ASC DESC +%token WITHIN NEAR %token LIMIT %token AND OR NOT IN %token ASSIGNMENT GREATER LESS GREATER_EQUAL LESS_EQUAL EQUAL UNEQUAL IDENTICAL UNIDENTICAL %token NULLX TRUE FALSE UNDEFINED -%token IDENTIFIER PARAMETER PARAMETER_NAMED STRING REAL +%token IDENTIFIER QUOTED_IDENTIFIER PARAMETER PARAMETER_NAMED STRING REAL %left ASSIGNMENT %right TERNARY COLON @@ -128,18 +138,18 @@ query: empty_query: { - context->_query->_type = QLQueryTypeEmpty; + template_->_query->_type = QLQueryTypeEmpty; } ; select_query: SELECT select_clause from_clause where_clause order_clause limit_clause { // full blown SELECT query - context->_query->_type = QLQueryTypeSelect; - context->_query->_select._base = $2; - context->_query->_from._base = $3; - context->_query->_where._base = $4; - context->_query->_order._base = $5; + template_->_query->_type = QLQueryTypeSelect; + template_->_query->_select._base = $2; + template_->_query->_from._base = $3; + template_->_query->_where._base = $4; + template_->_query->_order._base = $5; } ; @@ -149,70 +159,229 @@ select_clause: document { // select part of a SELECT $$ = $1; + ABORT_IF_OOM($$); } ; from_clause: FROM { // from part of a SELECT - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } from_list { - $$ = QLParseContextPop(context); + $$ = TRI_ParseQueryContextPop(template_); + ABORT_IF_OOM($$); } ; from_list: - collection_reference { + collection_reference geo_restriction { // single table query - QL_ast_node_t *lhs = $1->_lhs; - QL_ast_node_t *rhs = $1->_rhs; + ABORT_IF_OOM($1); + TRI_ParseQueryContextAddElement(template_, $1); - if (lhs != 0 && rhs != 0) { - if (strlen(lhs->_value._stringValue) > QL_QUERY_NAME_LEN || strlen(rhs->_value._stringValue) > QL_QUERY_NAME_LEN) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_INVALID, lhs->_value._stringValue); - YYABORT; - } - if (!QLAstQueryAddCollection(context->_query, lhs->_value._stringValue, rhs->_value._stringValue, true)) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_REDECLARED, rhs->_value._stringValue); + if ($2) { + if (!QLAstQueryAddGeoRestriction(template_->_query, $1, $2)) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_GEO_RESTRICTION_INVALID, ((TRI_query_node_t*) $2->_lhs)->_value._stringValue); YYABORT; } } - - QLParseContextAddElement(context, $1); } - | from_list join_type collection_reference ON expression { + | from_list join_type collection_reference geo_restriction ON expression { // multi-table query - QL_ast_node_t *lhs = $3->_lhs; - QL_ast_node_t *rhs = $3->_rhs; - + ABORT_IF_OOM($2); + ABORT_IF_OOM($3); + ABORT_IF_OOM($6); $$ = $2; - if ($$ != 0) { - $$->_lhs = $3; - $$->_rhs = $5; - } + $$->_lhs = $3; + $$->_rhs = $6; - if (lhs != 0 && rhs != 0) { - if (strlen(lhs->_value._stringValue) > QL_QUERY_NAME_LEN || strlen(rhs->_value._stringValue) > QL_QUERY_NAME_LEN) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_INVALID, lhs->_value._stringValue); - YYABORT; - } - if (!QLAstQueryAddCollection(context->_query, lhs->_value._stringValue, rhs->_value._stringValue, false)) { - QLParseRegisterParseError(context, ERR_COLLECTION_NAME_REDECLARED, rhs->_value._stringValue); + if ($4) { + if (!QLAstQueryAddGeoRestriction(template_->_query, $3, $4)) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_GEO_RESTRICTION_INVALID, ((TRI_query_node_t*) $4->_lhs)->_value._stringValue); YYABORT; } } - QLParseContextAddElement(context, $2); + TRI_ParseQueryContextAddElement(template_, $2); } ; +geo_2dvalue: + '[' geo_1dvalue ',' geo_1dvalue ']' { + ABORT_IF_OOM($2); + ABORT_IF_OOM($4); + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM($$); + + $$->_lhs = $2; + $$->_rhs = $4; + } + ; + +geo_1dvalue: + REAL { + double d; + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNumberDouble); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + + d = TRI_DoubleString($1); + if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, $1); + YYABORT; + } + $$->_value._doubleValue = d; + } + | '-' REAL %prec UMINUS { + double d; + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNumberDouble); + ABORT_IF_OOM($$); + ABORT_IF_OOM($2); + + d = TRI_DoubleString($2); + if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, $2); + YYABORT; + } + $$->_value._doubleValue = -1.0 * d; + } + ; + +geo_value: + geo_2dvalue { + ABORT_IF_OOM($1); + $$ = $1; + } + | geo_1dvalue ',' geo_1dvalue { + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM($$); + + $$->_lhs = $1; + $$->_rhs = $3; + } + ; + +geo_2dreference: + '[' geo_1dreference ',' geo_1dreference ']' { + ABORT_IF_OOM($2); + ABORT_IF_OOM($4); + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM($$); + $$->_lhs = $2; + $$->_rhs = $4; + } + ; + +geo_1dreference: + collection_alias { + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); + } object_access %prec MEMBER { + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_lhs = $1; + TRI_ParseQueryPopIntoRhs($$, template_); + } + ; + +geo_reference: + geo_2dreference { + ABORT_IF_OOM($1); + $$ = $1; + } + | geo_1dreference ',' geo_1dreference { + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueCoordinate); + ABORT_IF_OOM($$); + $$->_lhs = $1; + $$->_rhs = $3; + } + ; + +geo_restriction: + /* empty */ { + $$ = 0; + } + | WITHIN collection_alias ASSIGNMENT '(' geo_reference ',' geo_value ',' REAL ')' { + TRI_query_node_t* comp; + double distance; + + ABORT_IF_OOM($2); + ABORT_IF_OOM($5); + ABORT_IF_OOM($7); + ABORT_IF_OOM($9); + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeRestrictWithin); + ABORT_IF_OOM($$); + + distance = TRI_DoubleString($9); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, $9); + YYABORT; + } + $$->_value._doubleValue = distance; + + comp = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerCoordinatePair); + ABORT_IF_OOM(comp); + comp->_lhs = $5; + comp->_rhs = $7; + + $$->_lhs = $2; + $$->_rhs = comp; + } + | NEAR collection_alias ASSIGNMENT '(' geo_reference ',' geo_value ',' REAL ')' { + TRI_query_node_t* comp; + int64_t num; + + ABORT_IF_OOM($2); + ABORT_IF_OOM($5); + ABORT_IF_OOM($7); + ABORT_IF_OOM($9); + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeRestrictNear); + ABORT_IF_OOM($$); + + num = TRI_Int64String($9); + if (TRI_errno() != TRI_ERROR_NO_ERROR) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, $9); + YYABORT; + } + $$->_value._intValue = num; + + comp = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerCoordinatePair); + ABORT_IF_OOM(comp); + comp->_lhs = $5; + comp->_rhs = $7; + + $$->_lhs = $2; + $$->_rhs = comp; + } + /* + | NEAR collection_alias ASSIGNMENT '(' geo_reference ',' geo_value ',' geo_value ',' REAL ')' { + } + */ + ; + where_clause: /* empty */ { $$ = 0; } | WHERE expression { // where condition set + ABORT_IF_OOM($2); $$ = $2; } ; @@ -223,50 +392,52 @@ order_clause: } | ORDER BY { // order by part of a query - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } order_list { - $$ = QLParseContextPop(context); + $$ = TRI_ParseQueryContextPop(template_); + ABORT_IF_OOM($$); } ; order_list: order_element { - QLParseContextAddElement(context, $1); + ABORT_IF_OOM($1); + TRI_ParseQueryContextAddElement(template_, $1); } | order_list ',' order_element { - QLParseContextAddElement(context, $3); + ABORT_IF_OOM($3); + TRI_ParseQueryContextAddElement(template_, $3); } ; order_element: expression order_direction { - $$ = QLAstNodeCreate(context,QLNodeContainerOrderElement); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $2; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerOrderElement); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($2); + $$->_lhs = $1; + $$->_rhs = $2; } ; order_direction: /* empty */ { - $$ = QLAstNodeCreate(context,QLNodeValueOrderDirection); - if ($$ != 0) { - $$->_value._boolValue = true; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueOrderDirection); + ABORT_IF_OOM($$); + $$->_value._boolValue = true; } | ASC { - $$ = QLAstNodeCreate(context,QLNodeValueOrderDirection); - if ($$ != 0) { - $$->_value._boolValue = true; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueOrderDirection); + ABORT_IF_OOM($$); + $$->_value._boolValue = true; } | DESC { - $$ = QLAstNodeCreate(context,QLNodeValueOrderDirection); - if ($$ != 0) { - $$->_value._boolValue = false; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueOrderDirection); + ABORT_IF_OOM($$); + $$->_value._boolValue = false; } ; @@ -278,26 +449,26 @@ limit_clause: int64_t d = TRI_Int64String($2); if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, $2); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, $2); YYABORT; } - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = 0; - context->_query->_limit._count = d; + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = 0; + template_->_query->_limit._count = d; } | LIMIT '-' REAL { // limit - value int64_t d = TRI_Int64String($3); if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, $3); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, $3); YYABORT; } - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = 0; - context->_query->_limit._count = -d; + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = 0; + template_->_query->_limit._count = -d; } | LIMIT REAL ',' REAL { // limit value, value @@ -305,19 +476,19 @@ limit_clause: d1 = TRI_Int64String($2); if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, $2); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, $2); YYABORT; } d2 = TRI_Int64String($4); if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, $4); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, $4); YYABORT; } - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = d1; - context->_query->_limit._count = d2; + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = d1; + template_->_query->_limit._count = d2; } | LIMIT REAL ',' '-' REAL { // limit value, -value @@ -325,198 +496,272 @@ limit_clause: d1 = TRI_Int64String($2); if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, $2); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, $2); YYABORT; } d2 = TRI_Int64String($5); if (TRI_errno() != TRI_ERROR_NO_ERROR) { - QLParseRegisterParseError(context, ERR_LIMIT_VALUE_OUT_OF_RANGE, $5); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE, $5); YYABORT; } - context->_query->_limit._isUsed = true; - context->_query->_limit._offset = d1; - context->_query->_limit._count = -d2; + template_->_query->_limit._isUsed = true; + template_->_query->_limit._offset = d1; + template_->_query->_limit._count = -d2; } ; document: collection_alias { // document is a reference to a collection (by using its alias) + ABORT_IF_OOM($1); $$ = $1; } | '{' '}' { // empty document - $$ = QLAstNodeCreate(context,QLNodeValueDocument); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueDocument); + ABORT_IF_OOM($$); } | '{' { // listing of document attributes - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } attribute_list '}' { - $$ = QLAstNodeCreate(context,QLNodeValueDocument); - QLPopIntoRhs($$, context); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueDocument); + ABORT_IF_OOM($$); + TRI_ParseQueryPopIntoRhs($$, template_); } ; attribute_list: attribute { - QLParseContextAddElement(context, $1); + ABORT_IF_OOM($1); + TRI_ParseQueryContextAddElement(template_, $1); } | attribute_list ',' attribute { - QLParseContextAddElement(context, $3); + ABORT_IF_OOM($3); + TRI_ParseQueryContextAddElement(template_, $3); } ; attribute: named_attribute { + ABORT_IF_OOM($1); $$ = $1; } ; named_attribute: IDENTIFIER COLON expression { - QL_ast_node_t *identifier = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (identifier != 0) { - identifier->_value._stringValue = $1; - } + size_t outLength; + TRI_query_node_t* str = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueString); + ABORT_IF_OOM(str); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + str->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String($1, strlen($1), &outLength)); - $$ = QLAstNodeCreate(context,QLNodeValueNamedValue); - if ($$ != 0) { - $$->_lhs = identifier; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNamedValue); + ABORT_IF_OOM($$); + $$->_lhs = str; + $$->_rhs = $3; } | STRING COLON expression { size_t outLength; - QL_ast_node_t *str = QLAstNodeCreate(context,QLNodeValueString); - if (str) { - str->_value._stringValue = QLParseRegisterString(context, TRI_UnescapeUtf8String($1 + 1, strlen($1) - 2, &outLength)); - } + TRI_query_node_t* str = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueString); + ABORT_IF_OOM(str); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + str->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String($1 + 1, strlen($1) - 2, &outLength)); - $$ = QLAstNodeCreate(context,QLNodeValueNamedValue); - if ($$ != 0) { - $$->_lhs = str; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNamedValue); + ABORT_IF_OOM($$); + $$->_lhs = str; + $$->_rhs = $3; } ; collection_reference: - IDENTIFIER collection_alias { - QL_ast_node_t *name; + collection_name collection_alias { + ABORT_IF_OOM($1); + ABORT_IF_OOM($1->_value._stringValue); + ABORT_IF_OOM($2); + ABORT_IF_OOM($2->_value._stringValue); - $$ = QLAstNodeCreate(context,QLNodeReferenceCollection); - if ($$ != 0) { - name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = $1; - } - $$->_lhs = name; - $$->_rhs = $2; + if (!TRI_ParseQueryValidateCollectionName($1->_value._stringValue)) { + // validate collection name + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_COLLECTION_NAME_INVALID, $1->_value._stringValue); + YYABORT; } + + if (!TRI_ParseQueryValidateCollectionAlias($2->_value._stringValue)) { + // validate alias + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_COLLECTION_ALIAS_INVALID, $2->_value._stringValue); + YYABORT; + } + + if (!QLAstQueryAddCollection(template_->_query, $1->_value._stringValue, $2->_value._stringValue)) { + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_COLLECTION_ALIAS_REDECLARED, $2->_value._stringValue); + YYABORT; + } + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeReferenceCollection); + ABORT_IF_OOM($$); + $$->_lhs = $1; + $$->_rhs = $2; + } + ; + + +collection_name: + IDENTIFIER { + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_value._stringValue = $1; + } + | QUOTED_IDENTIFIER { + size_t outLength; + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String($1 + 1, strlen($1) - 2, &outLength)); } ; collection_alias: IDENTIFIER { - $$ = QLAstNodeCreate(context,QLNodeReferenceCollectionAlias); - if ($$ != 0) { - $$->_value._stringValue = $1; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeReferenceCollectionAlias); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_value._stringValue = $1; + } + | QUOTED_IDENTIFIER { + size_t outLength; + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeReferenceCollectionAlias); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String($1 + 1, strlen($1) - 2, &outLength)); } ; join_type: list_join { + ABORT_IF_OOM($1); $$ = $1; } | inner_join { + ABORT_IF_OOM($1); $$ = $1; } | outer_join { + ABORT_IF_OOM($1); $$ = $1; } ; list_join: LIST JOIN { - $$ = QLAstNodeCreate(context,QLNodeJoinList); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinList); + ABORT_IF_OOM($$); } ; inner_join: JOIN { - $$ = QLAstNodeCreate(context,QLNodeJoinInner); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinInner); + ABORT_IF_OOM($$); } | INNER JOIN { - $$ = QLAstNodeCreate(context,QLNodeJoinInner); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinInner); + ABORT_IF_OOM($$); } ; outer_join: LEFT OUTER JOIN { - $$ = QLAstNodeCreate(context,QLNodeJoinLeft); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinLeft); + ABORT_IF_OOM($$); } | LEFT JOIN { - $$ = QLAstNodeCreate(context,QLNodeJoinLeft); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinLeft); + ABORT_IF_OOM($$); + } + | RIGHT OUTER JOIN { + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinRight); + ABORT_IF_OOM($$); + } + | RIGHT JOIN { + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeJoinRight); + ABORT_IF_OOM($$); } ; expression: '(' expression ')' { + ABORT_IF_OOM($2); $$ = $2; } | unary_operator { + ABORT_IF_OOM($1); $$ = $1; } | binary_operator { + ABORT_IF_OOM($1); $$ = $1; } | conditional_operator { + ABORT_IF_OOM($1); $$ = $1; } | function_call { + ABORT_IF_OOM($1); $$ = $1; } | document { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } object_access %prec MEMBER { - $$ = QLAstNodeCreate(context, QLNodeContainerMemberAccess); - if ($$ != 0) { - $$->_lhs = $1; - QLPopIntoRhs($$, context); - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_lhs = $1; + TRI_ParseQueryPopIntoRhs($$, template_); } | document { + ABORT_IF_OOM($1); $$ = $1; } | array_declaration { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } object_access %prec MEMBER { - $$ = QLAstNodeCreate(context, QLNodeContainerMemberAccess); - if ($$ != 0) { - $$->_lhs = $1; - QLPopIntoRhs($$, context); - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_lhs = $1; + TRI_ParseQueryPopIntoRhs($$, template_); } | array_declaration { + ABORT_IF_OOM($1); $$ = $1; } | atom { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } object_access %prec MEMBER { - $$ = QLAstNodeCreate(context, QLNodeContainerMemberAccess); - if ($$ != 0) { - $$->_lhs = $1; - QLPopIntoRhs($$, context); - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerMemberAccess); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_lhs = $1; + TRI_ParseQueryPopIntoRhs($$, template_); } | atom { + ABORT_IF_OOM($1); $$ = $1; } ; @@ -524,304 +769,327 @@ expression: object_access: '.' IDENTIFIER { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = $2; - QLParseContextAddElement(context, name); - } + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM($2); + name->_value._stringValue = $2; + TRI_ParseQueryContextAddElement(template_, name); } | '.' function_call { - QLParseContextAddElement(context, $2); + ABORT_IF_OOM($2); + TRI_ParseQueryContextAddElement(template_, $2); } | object_access '.' IDENTIFIER { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = $3; - QLParseContextAddElement(context, name); - } + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM($3); + name->_value._stringValue = $3; + TRI_ParseQueryContextAddElement(template_, name); } | object_access '.' function_call { - QLParseContextAddElement(context, $3); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + TRI_ParseQueryContextAddElement(template_, $3); } ; unary_operator: '+' expression %prec UPLUS { - $$ = QLAstNodeCreate(context,QLNodeUnaryOperatorPlus); - if ($$ != 0) { - $$->_lhs = $2; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeUnaryOperatorPlus); + ABORT_IF_OOM($$); + ABORT_IF_OOM($2); + $$->_lhs = $2; } | '-' expression %prec UMINUS { - $$ = QLAstNodeCreate(context,QLNodeUnaryOperatorMinus); - if ($$ != 0) { - $$->_lhs = $2; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeUnaryOperatorMinus); + ABORT_IF_OOM($$); + ABORT_IF_OOM($2); + $$->_lhs = $2; } | NOT expression { - $$ = QLAstNodeCreate(context,QLNodeUnaryOperatorNot); - if ($$ != 0) { - $$->_lhs = $2; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeUnaryOperatorNot); + ABORT_IF_OOM($$); + ABORT_IF_OOM($2); + $$->_lhs = $2; } ; binary_operator: expression OR expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorOr); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorOr); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression AND expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorAnd); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorAnd); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression '+' expression { - $$ = QLAstNodeCreate(context, QLNodeBinaryOperatorAdd); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorAdd); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression '-' expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorSubtract); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorSubtract); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression '*' expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorMultiply); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorMultiply); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression '/' expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorDivide); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorDivide); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression '%' expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorModulus); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorModulus); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression IDENTICAL expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorIdentical); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorIdentical); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression UNIDENTICAL expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorUnidentical); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorUnidentical); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression EQUAL expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorEqual); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorEqual); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression UNEQUAL expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorUnequal); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorUnequal); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression LESS expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorLess); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorLess); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression GREATER expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorGreater); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorGreater); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression LESS_EQUAL expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorLessEqual); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorLessEqual); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression GREATER_EQUAL expression { - $$ = QLAstNodeCreate(context,QLNodeBinaryOperatorGreaterEqual); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorGreaterEqual); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } | expression IN expression { - $$ = QLAstNodeCreate(context, QLNodeBinaryOperatorIn); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = $3; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeBinaryOperatorIn); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + $$->_lhs = $1; + $$->_rhs = $3; } ; conditional_operator: expression TERNARY expression COLON expression { - QL_ast_node_t *node = QLAstNodeCreate(context, QLNodeContainerTernarySwitch); - if (node) { - node->_lhs = $3; - node->_rhs = $5; - } - $$ = QLAstNodeCreate(context, QLNodeControlTernary); - if ($$ != 0) { - $$->_lhs = $1; - $$->_rhs = node; - } + TRI_query_node_t* node = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerTernarySwitch); + ABORT_IF_OOM(node); + ABORT_IF_OOM($1); + ABORT_IF_OOM($3); + ABORT_IF_OOM($5); + node->_lhs = $3; + node->_rhs = $5; + + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeControlTernary); + ABORT_IF_OOM($$); + $$->_lhs = $1; + $$->_rhs = node; } ; function_call: function_invocation { + ABORT_IF_OOM($1); $$ = $1; } ; function_invocation: IDENTIFIER '(' ')' %prec FCALL { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = $1; - } + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM($1); + name->_value._stringValue = $1; - $$ = QLAstNodeCreate(context,QLNodeControlFunctionCall); - if ($$ != 0) { - $$->_lhs = name; - $$->_rhs = QLAstNodeCreate(context,QLNodeContainerList); - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeControlFunctionCall); + ABORT_IF_OOM($$); + $$->_lhs = name; + $$->_rhs = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM($$->_rhs); } | IDENTIFIER '(' { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } function_args_list ')' { - QL_ast_node_t *name = QLAstNodeCreate(context,QLNodeValueIdentifier); - if (name != 0) { - name->_value._stringValue = $1; - } + TRI_query_node_t* name = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueIdentifier); + ABORT_IF_OOM(name); + ABORT_IF_OOM($1); + name->_value._stringValue = $1; - $$ = QLAstNodeCreate(context,QLNodeControlFunctionCall); - if ($$ != 0) { - $$->_lhs = name; - QLPopIntoRhs($$, context); - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeControlFunctionCall); + ABORT_IF_OOM($$); + $$->_lhs = name; + TRI_ParseQueryPopIntoRhs($$, template_); } ; function_args_list: expression { - QLParseContextAddElement(context, $1); + TRI_ParseQueryContextAddElement(template_, $1); } | function_args_list ',' expression { - QLParseContextAddElement(context, $3); + ABORT_IF_OOM($3); + TRI_ParseQueryContextAddElement(template_, $3); } ; array_declaration: '[' ']' { - $$ = QLAstNodeCreate(context,QLNodeValueArray); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueArray); + ABORT_IF_OOM($$); } | '[' { - QL_ast_node_t *list = QLAstNodeCreate(context,QLNodeContainerList); - QLParseContextPush(context, list); + TRI_query_node_t* list = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeContainerList); + ABORT_IF_OOM(list); + TRI_ParseQueryContextPush(template_, list); } array_list ']' { - $$ = QLAstNodeCreate(context,QLNodeValueArray); - if ($$ != 0) { - QLPopIntoRhs($$, context); - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueArray); + ABORT_IF_OOM($$); + TRI_ParseQueryPopIntoRhs($$, template_); } ; array_list: expression { - QLParseContextAddElement(context, $1); + TRI_ParseQueryContextAddElement(template_, $1); } | array_list ',' expression { - QLParseContextAddElement(context, $3); + ABORT_IF_OOM($3); + TRI_ParseQueryContextAddElement(template_, $3); } ; atom: STRING { size_t outLength; - $$ = QLAstNodeCreate(context,QLNodeValueString); - if ($$ != 0) { - $$->_value._stringValue = QLParseRegisterString(context, TRI_UnescapeUtf8String($1 + 1, strlen($1) - 2, &outLength)); - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueString); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_value._stringValue = TRI_ParseQueryRegisterString(template_, TRI_UnescapeUtf8String($1 + 1, strlen($1) - 2, &outLength)); } | REAL { double d = TRI_DoubleString($1); if (TRI_errno() != TRI_ERROR_NO_ERROR && d != 0.0) { - QLParseRegisterParseError(context, ERR_NUMBER_OUT_OF_RANGE, $1); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE, $1); YYABORT; } - $$ = QLAstNodeCreate(context,QLNodeValueNumberDoubleString); - if ($$ != 0) { - $$->_value._stringValue = $1; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNumberDoubleString); + ABORT_IF_OOM($$); + ABORT_IF_OOM($1); + $$->_value._stringValue = $1; } | NULLX { - $$ = QLAstNodeCreate(context,QLNodeValueNull); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueNull); + ABORT_IF_OOM($$); } | UNDEFINED { - $$ = QLAstNodeCreate(context,QLNodeValueUndefined); + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueUndefined); + ABORT_IF_OOM($$); } | TRUE { - $$ = QLAstNodeCreate(context,QLNodeValueBool); - if ($$ != 0) { - $$->_value._boolValue = true; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueBool); + ABORT_IF_OOM($$); + $$->_value._boolValue = true; } | FALSE { - $$ = QLAstNodeCreate(context,QLNodeValueBool); - if ($$ != 0) { - $$->_value._boolValue = false; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueBool); + ABORT_IF_OOM($$); + $$->_value._boolValue = false; } | PARAMETER { // numbered parameter int64_t d = TRI_Int64String($1); if (TRI_errno() != TRI_ERROR_NO_ERROR || d < 0 || d >= 256) { - QLParseRegisterParseError(context, ERR_PARAMETER_NUMBER_OUT_OF_RANGE, $1); + TRI_SetQueryError(&template_->_error, TRI_ERROR_QUERY_BIND_PARAMETER_NUMBER_OUT_OF_RANGE, $1); YYABORT; } - $$ = QLAstNodeCreate(context,QLNodeValueParameterNumeric); - if ($$ != 0) { - $$->_value._intValue = d; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueParameterNumeric); + ABORT_IF_OOM($$); + $$->_value._intValue = d; } | PARAMETER_NAMED { // named parameter - $$ = QLAstNodeCreate(context,QLNodeValueParameterNamed); - if ($$ != 0) { - $$->_value._stringValue = $1; - } + $$ = TRI_ParseQueryCreateNode(template_, TRI_QueryNodeValueParameterNamed); + ABORT_IF_OOM($$); + $$->_value._stringValue = $1; } ; diff --git a/QL/tokens.c b/QL/tokens.c index 90337e5b1c..7e509eb73f 100644 --- a/QL/tokens.c +++ b/QL/tokens.c @@ -446,8 +446,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); yyg->yy_c_buf_p = yy_cp; /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ -#define YY_NUM_RULES 44 -#define YY_END_OF_BUFFER 45 +#define YY_NUM_RULES 47 +#define YY_END_OF_BUFFER 48 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -455,23 +455,24 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[135] = +static yyconst flex_int16_t yy_accept[147] = { 0, - 0, 0, 45, 43, 42, 42, 23, 43, 43, 43, - 37, 37, 25, 33, 35, 34, 24, 43, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 43, 43, 42, 28, 0, 38, 0, - 21, 0, 39, 0, 0, 37, 31, 30, 29, 32, - 40, 40, 0, 36, 36, 13, 36, 36, 36, 11, - 36, 36, 36, 36, 10, 36, 36, 36, 36, 36, - 36, 36, 36, 0, 22, 27, 37, 26, 40, 0, - 14, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 0, + 0, 0, 48, 46, 45, 45, 25, 46, 46, 46, + 40, 40, 27, 35, 37, 36, 26, 46, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 46, 46, 46, 45, 30, 0, 41, + 0, 23, 0, 42, 0, 0, 40, 33, 32, 31, + 34, 43, 43, 0, 38, 38, 13, 38, 38, 38, + 11, 38, 38, 38, 38, 38, 10, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 0, 0, 0, 39, + 24, 29, 40, 28, 43, 0, 14, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 41, 15, 36, 2, 36, 5, 7, 36, 4, 17, - 36, 36, 36, 36, 19, 36, 36, 0, 37, 20, - 6, 16, 12, 9, 8, 36, 36, 3, 1, 36, - 36, 36, 18, 0 + 38, 38, 38, 38, 38, 38, 38, 0, 44, 15, + 38, 2, 38, 5, 7, 38, 4, 22, 17, 38, + 38, 38, 38, 19, 38, 38, 38, 0, 40, 20, + 6, 16, 12, 9, 8, 38, 38, 3, 38, 1, + 38, 21, 38, 38, 18, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -485,11 +486,11 @@ static yyconst flex_int32_t yy_ec[256] = 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 28, 28, 33, 34, 35, 36, 28, 37, 28, 38, 28, - 1, 39, 1, 1, 40, 1, 41, 42, 43, 44, + 1, 39, 1, 1, 40, 41, 42, 43, 44, 45, - 45, 46, 47, 48, 49, 50, 28, 51, 52, 53, - 54, 28, 28, 55, 56, 57, 58, 28, 59, 28, - 60, 28, 1, 61, 1, 1, 1, 1, 1, 1, + 46, 47, 48, 49, 50, 51, 28, 52, 53, 54, + 55, 28, 28, 56, 57, 58, 59, 28, 60, 28, + 61, 28, 1, 62, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -506,100 +507,105 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[62] = +static yyconst flex_int32_t yy_meta[63] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 4, + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 1 + 3, 1 } ; -static yyconst flex_int16_t yy_base[143] = +static yyconst flex_int16_t yy_base[156] = { 0, - 0, 0, 245, 287, 60, 62, 229, 61, 236, 60, - 232, 59, 287, 57, 226, 184, 287, 63, 41, 38, - 0, 56, 61, 50, 50, 61, 49, 59, 60, 66, - 58, 62, 71, 154, 123, 118, 167, 79, 287, 147, - 287, 98, 287, 141, 112, 115, 287, 287, 75, 287, - 287, 117, 0, 0, 88, 0, 95, 101, 100, 102, - 108, 112, 108, 110, 0, 115, 105, 119, 112, 109, - 125, 125, 138, 40, 287, 287, 161, 287, 163, 60, - 0, 133, 131, 138, 134, 144, 142, 154, 147, 156, - 164, 166, 164, 169, 170, 171, 162, 0, 190, 210, + 0, 0, 266, 312, 61, 63, 251, 62, 257, 61, + 251, 60, 312, 58, 241, 182, 312, 64, 42, 41, + 0, 58, 63, 52, 52, 63, 72, 79, 61, 68, + 60, 66, 96, 152, 47, 103, 75, 139, 86, 312, + 147, 312, 85, 312, 140, 116, 119, 312, 312, 89, + 312, 312, 126, 0, 0, 97, 0, 98, 105, 107, + 109, 97, 119, 114, 131, 122, 0, 131, 119, 132, + 129, 123, 139, 139, 129, 158, 58, 131, 92, 312, + 312, 312, 168, 312, 178, 65, 0, 155, 149, 156, + 169, 162, 159, 169, 162, 167, 172, 180, 181, 179, - 287, 0, 174, 0, 169, 0, 0, 170, 0, 0, - 177, 180, 187, 188, 0, 200, 203, 218, 223, 0, - 0, 0, 0, 0, 0, 201, 200, 0, 0, 206, - 216, 218, 0, 287, 262, 266, 269, 271, 273, 276, - 279, 282 + 183, 185, 186, 177, 186, 0, 202, 226, 312, 0, + 199, 0, 185, 0, 0, 190, 0, 0, 0, 197, + 205, 204, 202, 0, 217, 221, 218, 239, 241, 0, + 0, 0, 0, 0, 0, 212, 228, 0, 225, 0, + 226, 0, 236, 238, 0, 312, 283, 287, 290, 292, + 294, 298, 301, 304, 307 } ; -static yyconst flex_int16_t yy_def[143] = +static yyconst flex_int16_t yy_def[156] = { 0, - 134, 1, 134, 134, 134, 134, 134, 135, 134, 136, - 134, 134, 134, 134, 134, 134, 134, 137, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 139, 134, 134, 134, 135, 134, 135, - 134, 136, 134, 136, 134, 134, 134, 134, 134, 134, - 134, 134, 140, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 141, 139, 134, 134, 134, 134, 134, 140, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 142, 141, 134, + 146, 1, 146, 146, 146, 146, 146, 147, 146, 148, + 146, 146, 146, 146, 146, 146, 146, 149, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 151, 152, 146, 146, 146, 147, 146, + 147, 146, 148, 146, 148, 146, 146, 146, 146, 146, + 146, 146, 146, 153, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 154, 151, 152, 152, 146, + 146, 146, 146, 146, 146, 153, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 134, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 134, 134, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 0, 134, 134, 134, 134, 134, 134, - 134, 134 + 150, 150, 150, 150, 150, 155, 154, 146, 146, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 146, 146, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 0, 146, 146, 146, 146, + 146, 146, 146, 146, 146 } ; -static yyconst flex_int16_t yy_nxt[349] = +static yyconst flex_int16_t yy_nxt[375] = { 0, 4, 5, 6, 7, 8, 9, 10, 4, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 21, 23, 21, 21, 24, 25, 21, 26, 21, 27, 28, 29, 30, 31, 32, 33, 21, 4, 34, - 19, 20, 21, 22, 21, 23, 21, 21, 24, 25, - 26, 21, 27, 28, 29, 30, 31, 32, 33, 21, - 35, 36, 36, 36, 36, 39, 43, 45, 46, 46, - 47, 48, 51, 52, 55, 56, 101, 57, 58, 74, - 60, 61, 62, 39, 64, 68, 63, 69, 78, 65, - 70, 66, 71, 59, 67, 72, 55, 56, 44, 40, + 35, 19, 20, 21, 22, 21, 23, 21, 21, 24, + 25, 26, 21, 27, 28, 29, 30, 31, 32, 33, + 21, 36, 37, 37, 37, 37, 40, 44, 46, 47, + 47, 48, 49, 52, 53, 56, 37, 37, 57, 58, + 59, 109, 61, 62, 63, 79, 70, 80, 64, 71, + 40, 44, 72, 65, 146, 60, 73, 77, 56, 45, - 57, 58, 60, 61, 43, 62, 64, 81, 68, 63, - 69, 65, 70, 66, 71, 59, 67, 40, 72, 36, - 36, 77, 77, 45, 46, 46, 79, 79, 82, 83, - 81, 84, 85, 86, 87, 91, 44, 88, 90, 92, - 94, 89, 93, 134, 95, 96, 97, 98, 98, 134, - 82, 83, 102, 84, 85, 105, 86, 87, 91, 88, - 90, 92, 94, 89, 103, 93, 95, 104, 96, 97, - 77, 77, 79, 79, 106, 102, 107, 98, 105, 108, - 76, 109, 100, 75, 110, 111, 103, 112, 113, 104, - 114, 115, 116, 74, 117, 120, 106, 50, 107, 98, + 41, 57, 84, 58, 59, 61, 62, 66, 63, 67, + 70, 68, 64, 71, 69, 72, 87, 65, 60, 73, + 74, 75, 92, 45, 41, 83, 83, 46, 47, 47, + 66, 88, 67, 89, 68, 85, 85, 69, 90, 91, + 87, 93, 146, 94, 74, 75, 92, 95, 96, 146, + 97, 98, 82, 99, 88, 100, 89, 101, 102, 103, + 104, 90, 91, 105, 81, 93, 94, 106, 106, 79, + 95, 80, 96, 97, 110, 98, 99, 83, 83, 100, + 101, 102, 111, 103, 104, 112, 105, 85, 85, 108, + 113, 77, 114, 115, 116, 51, 117, 106, 110, 118, - 98, 121, 108, 109, 122, 100, 110, 126, 111, 123, - 112, 113, 124, 114, 115, 116, 117, 118, 120, 119, - 119, 125, 127, 121, 128, 130, 122, 119, 119, 98, - 126, 123, 119, 119, 124, 129, 131, 132, 133, 49, - 45, 41, 37, 125, 134, 127, 134, 128, 130, 134, - 134, 134, 134, 134, 134, 134, 134, 129, 131, 134, - 132, 133, 38, 38, 38, 38, 42, 42, 42, 42, - 53, 53, 54, 54, 54, 73, 73, 80, 80, 80, - 99, 99, 99, 98, 98, 98, 3, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 119, 120, 121, 122, 123, 111, 124, 125, 112, 126, + 127, 106, 106, 108, 113, 114, 115, 131, 116, 117, + 130, 136, 118, 119, 132, 120, 121, 122, 123, 133, + 124, 125, 126, 128, 127, 129, 129, 134, 135, 137, + 131, 106, 138, 139, 130, 136, 140, 132, 129, 129, + 129, 129, 133, 141, 50, 142, 143, 144, 145, 46, + 134, 135, 42, 137, 38, 146, 138, 139, 146, 140, + 146, 146, 146, 146, 146, 146, 146, 141, 142, 143, + 146, 144, 145, 39, 39, 39, 39, 43, 43, 43, + 43, 54, 54, 55, 55, 55, 76, 76, 78, 78, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134 + 78, 78, 86, 86, 86, 107, 107, 107, 106, 106, + 106, 3, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146 } ; -static yyconst flex_int16_t yy_chk[349] = +static yyconst flex_int16_t yy_chk[375] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -607,54 +613,57 @@ static yyconst flex_int16_t yy_chk[349] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 5, 5, 6, 6, 8, 10, 12, 12, 12, - 14, 14, 18, 18, 19, 20, 80, 22, 23, 74, - 24, 25, 26, 38, 27, 29, 26, 30, 49, 28, - 31, 28, 32, 23, 28, 33, 19, 20, 10, 8, + 1, 1, 5, 5, 6, 6, 8, 10, 12, 12, + 12, 14, 14, 18, 18, 19, 37, 37, 20, 22, + 23, 86, 24, 25, 26, 35, 29, 35, 26, 30, + 39, 43, 31, 27, 79, 23, 32, 77, 19, 10, - 22, 23, 24, 25, 42, 26, 27, 55, 29, 26, - 30, 28, 31, 28, 32, 23, 28, 38, 33, 36, - 36, 45, 45, 46, 46, 46, 52, 52, 57, 58, - 55, 59, 60, 61, 62, 66, 42, 63, 64, 67, - 69, 63, 68, 44, 70, 71, 72, 73, 73, 40, - 57, 58, 82, 59, 60, 85, 61, 62, 66, 63, - 64, 67, 69, 63, 83, 68, 70, 84, 71, 72, - 77, 77, 79, 79, 86, 82, 87, 73, 85, 88, - 37, 89, 77, 35, 90, 91, 83, 92, 93, 84, - 94, 95, 96, 34, 97, 103, 86, 16, 87, 99, + 8, 20, 50, 22, 23, 24, 25, 27, 26, 28, + 29, 28, 26, 30, 28, 31, 56, 27, 23, 32, + 33, 33, 62, 43, 39, 46, 46, 47, 47, 47, + 27, 58, 28, 59, 28, 53, 53, 28, 60, 61, + 56, 63, 45, 64, 33, 33, 62, 64, 65, 41, + 66, 68, 38, 69, 58, 70, 59, 71, 72, 73, + 74, 60, 61, 75, 36, 63, 64, 76, 76, 78, + 64, 78, 65, 66, 88, 68, 69, 83, 83, 70, + 71, 72, 89, 73, 74, 90, 75, 85, 85, 83, + 91, 34, 92, 93, 94, 16, 95, 76, 88, 96, - 99, 105, 88, 89, 108, 77, 90, 114, 91, 111, - 92, 93, 112, 94, 95, 96, 97, 100, 103, 100, - 100, 113, 116, 105, 117, 127, 108, 118, 118, 99, - 114, 111, 119, 119, 112, 126, 130, 131, 132, 15, - 11, 9, 7, 113, 3, 116, 0, 117, 127, 0, - 0, 0, 0, 0, 0, 0, 0, 126, 130, 0, - 131, 132, 135, 135, 135, 135, 136, 136, 136, 136, - 137, 137, 138, 138, 138, 139, 139, 140, 140, 140, - 141, 141, 141, 142, 142, 142, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, + 97, 98, 99, 100, 101, 89, 102, 103, 90, 104, + 105, 107, 107, 83, 91, 92, 93, 113, 94, 95, + 111, 123, 96, 97, 116, 98, 99, 100, 101, 120, + 102, 103, 104, 108, 105, 108, 108, 121, 122, 125, + 113, 107, 126, 127, 111, 123, 136, 116, 128, 128, + 129, 129, 120, 137, 15, 139, 141, 143, 144, 11, + 121, 122, 9, 125, 7, 3, 126, 127, 0, 136, + 0, 0, 0, 0, 0, 0, 0, 137, 139, 141, + 0, 143, 144, 147, 147, 147, 147, 148, 148, 148, + 148, 149, 149, 150, 150, 150, 151, 151, 152, 152, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134 + 152, 152, 153, 153, 153, 154, 154, 154, 155, 155, + 155, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146 } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[45] = +static yyconst flex_int32_t yy_rule_can_match_eol[48] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 0, 0, 1, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 1, 1, 0, 0, 1, 0, 0, }; -static yyconst flex_int16_t yy_rule_linenum[44] = +static yyconst flex_int16_t yy_rule_linenum[47] = { 0, - 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, - 89, 93, 97, 101, 105, 109, 118, 122, 126, 130, - 139, 143, 147, 156, 160, 169, 173, 177, 181, 185, - 189, 193, 197, 201, 210, 219, 224, 229, 234, 244, - 249, 259, 263 + 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, + 93, 97, 101, 105, 109, 113, 122, 126, 130, 134, + 143, 147, 156, 160, 164, 173, 177, 186, 190, 194, + 198, 202, 206, 210, 214, 218, 227, 236, 241, 246, + 251, 256, 266, 271, 281, 285 } ; /* The intent behind this definition is that it'll catch @@ -667,30 +676,34 @@ static yyconst flex_int16_t yy_rule_linenum[44] = #include #include -#include "QL/ast-node.h" -#include "QL/parser-context.h" +#include "VocBase/query-node.h" +#include "VocBase/query-base.h" +#include "VocBase/query-parse.h" #include "QL/parser.h" -#define YY_EXTRA_TYPE QL_parser_context_t* -#define YY_USER_ACTION yylloc->first_line = yylineno; yylloc->first_column = yycolumn; yylloc->last_column = yycolumn + yyleng - 1; yycolumn += yyleng; +#define YY_EXTRA_TYPE TRI_query_template_t* + +// currently we do not use the positioning information +// #define YY_USER_ACTION yylloc->first_line = yylineno; yylloc->first_column = yycolumn; yylloc->last_column = yycolumn + yyleng - 1; yycolumn += yyleng; #define YY_NO_INPUT 1 -#define YY_INPUT(resultBuffer,resultState,maxBytesToRead) { \ - int length = (yyextra)->_lexState._length; \ - \ - if (length > maxBytesToRead) { \ - length = maxBytesToRead; \ - } \ - if (length > 0) { \ - memcpy(resultBuffer, (yyextra)->_lexState._buffer,length); \ - (yyextra)->_lexState._buffer += length; \ - (yyextra)->_lexState._length -= length; \ - resultState = length; \ - } \ - else { \ - resultState = YY_NULL; \ - } \ +#define YY_INPUT(resultBuffer, resultState, maxBytesToRead) { \ + TRI_query_parser_t* parser = (yyextra)->_parser; \ + int length = parser->_length; \ + \ + if (length > maxBytesToRead) { \ + length = maxBytesToRead; \ + } \ + if (length > 0) { \ + memcpy(resultBuffer, parser->_buffer, length); \ + parser->_buffer += length; \ + parser->_length -= length; \ + resultState = length; \ + } \ + else { \ + resultState = YY_NULL; \ + } \ } #define INITIAL 0 @@ -1065,13 +1078,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 147 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 134 ); + while ( yy_current_state != 146 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -1102,13 +1115,13 @@ do_action: /* This label is used only to access EOF actions. */ { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 44 ) + else if ( yy_act < 47 ) fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", (long)yy_rule_linenum[yy_act], yytext ); - else if ( yy_act == 44 ) + else if ( yy_act == 47 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); - else if ( yy_act == 45 ) + else if ( yy_act == 48 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); @@ -1248,21 +1261,36 @@ YY_RULE_SETUP } YY_BREAK /* --------------------------------------------------------------------------- - * logical operators + * other keywords * --------------------------------------------------------------------------- */ case 21: YY_RULE_SETUP { - return AND; + return WITHIN; } YY_BREAK case 22: YY_RULE_SETUP +{ + return NEAR; +} + YY_BREAK +/* --------------------------------------------------------------------------- + * logical operators + * --------------------------------------------------------------------------- */ +case 23: +YY_RULE_SETUP +{ + return AND; +} + YY_BREAK +case 24: +YY_RULE_SETUP { return OR; } YY_BREAK -case 23: +case 25: YY_RULE_SETUP { return NOT; @@ -1271,13 +1299,13 @@ YY_RULE_SETUP /* --------------------------------------------------------------------------- * ternary operator * --------------------------------------------------------------------------- */ -case 24: +case 26: YY_RULE_SETUP { return TERNARY; } YY_BREAK -case 25: +case 27: YY_RULE_SETUP { return COLON; @@ -1286,55 +1314,55 @@ YY_RULE_SETUP /* --------------------------------------------------------------------------- * comparison operators * --------------------------------------------------------------------------- */ -case 26: +case 28: YY_RULE_SETUP { return IDENTICAL; } YY_BREAK -case 27: +case 29: YY_RULE_SETUP { return UNIDENTICAL; } YY_BREAK -case 28: -YY_RULE_SETUP -{ - return UNEQUAL; -} - YY_BREAK -case 29: -YY_RULE_SETUP -{ - return EQUAL; -} - YY_BREAK case 30: YY_RULE_SETUP -{ +{ return UNEQUAL; } YY_BREAK case 31: YY_RULE_SETUP { - return LESS_EQUAL; + return EQUAL; } YY_BREAK case 32: YY_RULE_SETUP { - return GREATER_EQUAL; + return UNEQUAL; } YY_BREAK case 33: YY_RULE_SETUP +{ + return LESS_EQUAL; +} + YY_BREAK +case 34: +YY_RULE_SETUP +{ + return GREATER_EQUAL; +} + YY_BREAK +case 35: +YY_RULE_SETUP { return LESS; } YY_BREAK -case 34: +case 36: YY_RULE_SETUP { return GREATER; @@ -1343,7 +1371,7 @@ YY_RULE_SETUP /* --------------------------------------------------------------------------- * assignment * --------------------------------------------------------------------------- */ -case 35: +case 37: YY_RULE_SETUP { return ASSIGNMENT; @@ -1352,70 +1380,78 @@ YY_RULE_SETUP /* --------------------------------------------------------------------------- * literals * --------------------------------------------------------------------------- */ -case 36: +case 38: YY_RULE_SETUP { - yylval->strval = QLParseAllocString(yyextra, yytext); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); return IDENTIFIER; } YY_BREAK -case 37: -YY_RULE_SETUP -{ - yylval->strval = QLParseAllocString(yyextra, yytext); - return REAL; -} - YY_BREAK -case 38: -/* rule 38 can match eol */ -YY_RULE_SETUP -{ - yylval->strval = QLParseAllocString(yyextra, yytext); - return STRING; -} - YY_BREAK case 39: /* rule 39 can match eol */ YY_RULE_SETUP { - yylval->strval = QLParseAllocString(yyextra, yytext); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); + return QUOTED_IDENTIFIER; +} + YY_BREAK +case 40: +YY_RULE_SETUP +{ + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); + return REAL; +} + YY_BREAK +case 41: +/* rule 41 can match eol */ +YY_RULE_SETUP +{ + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); + return STRING; +} + YY_BREAK +case 42: +/* rule 42 can match eol */ +YY_RULE_SETUP +{ + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); return STRING; } YY_BREAK /* --------------------------------------------------------------------------- * parameters * --------------------------------------------------------------------------- */ -case 40: +case 43: YY_RULE_SETUP { - yylval->strval = QLParseAllocString(yyextra, yytext + 1); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext + 1); return PARAMETER; } YY_BREAK -case 41: +case 44: YY_RULE_SETUP { - yylval->strval = QLParseAllocString2(yyextra, yytext + 1 , strlen(yytext) - 2); + yylval->strval = TRI_ParseQueryAllocString2(yyextra, yytext + 1 , strlen(yytext) - 2); return PARAMETER_NAMED; } YY_BREAK /* --------------------------------------------------------------------------- * whitespace etc. * --------------------------------------------------------------------------- */ -case 42: -/* rule 42 can match eol */ +case 45: +/* rule 45 can match eol */ YY_RULE_SETUP { /* whitespace */; } YY_BREAK -case 43: +case 46: YY_RULE_SETUP { return (int) yytext[0]; } YY_BREAK -case 44: +case 47: YY_RULE_SETUP ECHO; YY_BREAK @@ -1734,7 +1770,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 147 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1768,11 +1804,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 147 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 134); + yy_is_jam = (yy_current_state == 146); return yy_is_jam ? 0 : yy_current_state; } diff --git a/QL/tokens.l b/QL/tokens.l index a5dc327d1d..3e812480d8 100644 --- a/QL/tokens.l +++ b/QL/tokens.l @@ -11,30 +11,34 @@ #include #include -#include "QL/ast-node.h" -#include "QL/parser-context.h" +#include "VocBase/query-node.h" +#include "VocBase/query-base.h" +#include "VocBase/query-parse.h" #include "QL/parser.h" -#define YY_EXTRA_TYPE QL_parser_context_t* -#define YY_USER_ACTION yylloc->first_line = yylineno; yylloc->first_column = yycolumn; yylloc->last_column = yycolumn + yyleng - 1; yycolumn += yyleng; +#define YY_EXTRA_TYPE TRI_query_template_t* + +// currently we do not use the positioning information +// #define YY_USER_ACTION yylloc->first_line = yylineno; yylloc->first_column = yycolumn; yylloc->last_column = yycolumn + yyleng - 1; yycolumn += yyleng; #define YY_NO_INPUT 1 -#define YY_INPUT(resultBuffer,resultState,maxBytesToRead) { \ - int length = (yyextra)->_lexState._length; \ - \ - if (length > maxBytesToRead) { \ - length = maxBytesToRead; \ - } \ - if (length > 0) { \ - memcpy(resultBuffer, (yyextra)->_lexState._buffer,length); \ - (yyextra)->_lexState._buffer += length; \ - (yyextra)->_lexState._length -= length; \ - resultState = length; \ - } \ - else { \ - resultState = YY_NULL; \ - } \ +#define YY_INPUT(resultBuffer, resultState, maxBytesToRead) { \ + TRI_query_parser_t* parser = (yyextra)->_parser; \ + int length = parser->_length; \ + \ + if (length > maxBytesToRead) { \ + length = maxBytesToRead; \ + } \ + if (length > 0) { \ + memcpy(resultBuffer, parser->_buffer, length); \ + parser->_buffer += length; \ + parser->_length -= length; \ + resultState = length; \ + } \ + else { \ + resultState = YY_NULL; \ + } \ } %} @@ -131,6 +135,19 @@ return FALSE; } + + /* --------------------------------------------------------------------------- + * other keywords + * --------------------------------------------------------------------------- */ + +(?i:within) { + return WITHIN; +} + +(?i:near) { + return NEAR; +} + /* --------------------------------------------------------------------------- * logical operators @@ -217,37 +234,42 @@ * --------------------------------------------------------------------------- */ ([a-zA-Z][_a-zA-Z0-9]*|_+[a-zA-Z]+[_a-zA-Z0-9]*) { - yylval->strval = QLParseAllocString(yyextra, yytext); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); return IDENTIFIER; } +`(\\.|[^\\`])*` { + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); + return QUOTED_IDENTIFIER; +} + (0|[1-9][0-9]*)(\.[0-9]+([eE]([\-\+])?[0-9]+)?)? { - yylval->strval = QLParseAllocString(yyextra, yytext); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); return REAL; } \"(\\.|[^\\\"])*\" { - yylval->strval = QLParseAllocString(yyextra, yytext); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); return STRING; } '(\\.|[^\\'])*' { - yylval->strval = QLParseAllocString(yyextra, yytext); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext); return STRING; } - + /* --------------------------------------------------------------------------- * parameters * --------------------------------------------------------------------------- */ @(0|[1-9][0-9]*) { - yylval->strval = QLParseAllocString(yyextra, yytext + 1); + yylval->strval = TRI_ParseQueryAllocString(yyextra, yytext + 1); return PARAMETER; } @[a-zA-Z][a-zA-Z0-9_]+@ { - yylval->strval = QLParseAllocString2(yyextra, yytext + 1 , strlen(yytext) - 2); + yylval->strval = TRI_ParseQueryAllocString2(yyextra, yytext + 1 , strlen(yytext) - 2); return PARAMETER_NAMED; } diff --git a/README.md b/README.md index 9733300017..ed469a9e1f 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,16 @@ effort to operate for the administrator. ## Compilation -1. Install Dependencies: V8, boost, libev -2. make setup -3. ./configure --with-boost=PATH_TO_BOOST --with-libev=PATH_TO_LIBEV --with-v8=PATH_TO_V8 -4. make -5. create a directory `/var/lib/avocado` where you are allowed to read and write -6. "./avocado /var/lib/avocado" to start a REST server or "./avocado /var/lib/avocado --shell" for debugging +Please check the wiki +for installation and compilation instructions: ### Mac OS X Hints -If you install AvocadoDB on Mac OS X we collected some hints for you: +On Mac OS X you can install AvocadoDB using the packagemanager [Homebrew](http://mxcl.github.com/homebrew/). We are currently waiting for approval of our package, therefore you need to use this: -* The version of bison delivered with OS X is out of date. Update it before installing. +* `brew install https://raw.github.com/tisba/homebrew/master/Library/Formula/avocadodb.rb` + +This will install AvocadoDB and all dependencies. ## First Steps @@ -26,3 +24,11 @@ If you install AvocadoDB on Mac OS X we collected some hints for you: avocado> db.examples.count(); avocado> db.examples.save({ Hallo: "World" }); avocado> db.examples.select(); + +## Caveat + +Please note that this is a very early version if AvocadoDB. There will be +bugs and we'd realy appreciate it if you +report them: + + https://github.com/triAGENS/AvocadoDB/issues diff --git a/Rest/HttpRequest.cpp b/Rest/HttpRequest.cpp index b9d41560d8..7e2bb297b9 100644 --- a/Rest/HttpRequest.cpp +++ b/Rest/HttpRequest.cpp @@ -266,6 +266,10 @@ namespace triagens { buffer->appendText("DELETE "); break; + case HTTP_REQUEST_HEAD: + buffer->appendText("HEAD "); + break; + default: buffer->appendText("UNKNOWN "); break; @@ -447,6 +451,9 @@ namespace triagens { else if (strcmp(keyBegin, "get") == 0) { type = HTTP_REQUEST_GET; } + else if (strcmp(keyBegin, "head") == 0) { + type = HTTP_REQUEST_HEAD; + } // extract the path and decode the url and parameters if (type != HTTP_REQUEST_ILLEGAL) { @@ -532,6 +539,9 @@ namespace triagens { else if (strcmp(keyBegin, "get") == 0) { type = HTTP_REQUEST_GET; } + else if (strcmp(keyBegin, "head") == 0) { + type = HTTP_REQUEST_HEAD; + } } } diff --git a/Rest/HttpRequest.h b/Rest/HttpRequest.h index ddc2d464cc..b5438ffe15 100644 --- a/Rest/HttpRequest.h +++ b/Rest/HttpRequest.h @@ -63,6 +63,7 @@ namespace triagens { enum HttpRequestType { HTTP_REQUEST_DELETE, HTTP_REQUEST_GET, + HTTP_REQUEST_HEAD, HTTP_REQUEST_POST, HTTP_REQUEST_PUT, HTTP_REQUEST_ILLEGAL diff --git a/Rest/Initialise.cpp b/Rest/Initialise.cpp index 4046bb6bd3..91ad600ea4 100644 --- a/Rest/Initialise.cpp +++ b/Rest/Initialise.cpp @@ -142,6 +142,10 @@ namespace triagens { void ShutdownRest () { +#ifdef TRI_HAVE_POSIX_THREADS + opensslCleanup(); +#endif + TRI_ShutdownUrl(); TRIAGENS_BASICS_SHUTDOWN; diff --git a/RestHandler/RestActionHandler.cpp b/RestHandler/RestActionHandler.cpp index e1d0202a0b..0abd8b4d3c 100644 --- a/RestHandler/RestActionHandler.cpp +++ b/RestHandler/RestActionHandler.cpp @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,18 +22,15 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// #include "RestActionHandler.h" -#include - -#include - -#include -#include -#include +#include "Basics/StringUtils.h" +#include "Rest/HttpRequest.h" +#include "VocBase/document-collection.h" +#include "VocBase/vocbase.h" using namespace std; using namespace triagens::basics; @@ -91,6 +88,7 @@ HttpHandler::status_e RestActionHandler::execute () { // prepare logging static LoggerData::Task const logExecute(ACTION_PATH + " [execute]"); + static LoggerData::Task const logHead(ACTION_PATH + " [head]"); static LoggerData::Task const logIllegal(ACTION_PATH + " [illegal]"); LoggerData::Task const * task = &logIllegal; @@ -100,6 +98,7 @@ HttpHandler::status_e RestActionHandler::execute () { case HttpRequest::HTTP_REQUEST_GET: task = &logExecute; break; case HttpRequest::HTTP_REQUEST_POST: task = &logIllegal; break; case HttpRequest::HTTP_REQUEST_PUT: task = &logIllegal; break; + case HttpRequest::HTTP_REQUEST_HEAD: task = &logHead; break; case HttpRequest::HTTP_REQUEST_ILLEGAL: task = &logIllegal; break; } diff --git a/RestHandler/RestActionHandler.h b/RestHandler/RestActionHandler.h index 0bf080468f..b48502d2af 100644 --- a/RestHandler/RestActionHandler.h +++ b/RestHandler/RestActionHandler.h @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,11 +22,11 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_ACTION_HANDLER_H -#define TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_ACTION_HANDLER_H 1 +#ifndef TRIAGENS_REST_HANDLER_REST_ACTION_HANDLER_H +#define TRIAGENS_REST_HANDLER_REST_ACTION_HANDLER_H 1 #include "RestHandler/RestVocbaseBaseHandler.h" diff --git a/RestHandler/RestDocumentHandler.cpp b/RestHandler/RestCollectionHandler.cpp similarity index 53% rename from RestHandler/RestDocumentHandler.cpp rename to RestHandler/RestCollectionHandler.cpp index b752e8f611..bf91b10432 100644 --- a/RestHandler/RestDocumentHandler.cpp +++ b/RestHandler/RestCollectionHandler.cpp @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,18 +22,16 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#include "RestDocumentHandler.h" +#include "RestCollectionHandler.h" -#include - -#include - -#include -#include -#include +#include "Basics/StringUtils.h" +#include "BasicsC/string-buffer.h" +#include "Rest/HttpRequest.h" +#include "VocBase/simple-collection.h" +#include "VocBase/vocbase.h" using namespace triagens::basics; using namespace triagens::rest; @@ -52,19 +50,28 @@ using namespace triagens::avocado; /// @brief constructor //////////////////////////////////////////////////////////////////////////////// -RestDocumentHandler::RestDocumentHandler (HttpRequest* request, TRI_vocbase_t* vocbase) +RestCollectionHandler::RestCollectionHandler (HttpRequest* request, TRI_vocbase_t* vocbase) : RestVocbaseBaseHandler(request, vocbase) { } +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + // ----------------------------------------------------------------------------- // --SECTION-- Handler methods // ----------------------------------------------------------------------------- +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup AvocadoDB +/// @{ +//////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// /// {@inheritDoc} //////////////////////////////////////////////////////////////////////////////// -HttpHandler::status_e RestDocumentHandler::execute () { +HttpHandler::status_e RestCollectionHandler::execute () { // extract the sub-request type HttpRequest::HttpRequestType type = request->requestType(); @@ -74,6 +81,7 @@ HttpHandler::status_e RestDocumentHandler::execute () { static LoggerData::Task const logRead(DOCUMENT_PATH + " [read]"); static LoggerData::Task const logUpdate(DOCUMENT_PATH + " [update]"); static LoggerData::Task const logDelete(DOCUMENT_PATH + " [delete]"); + static LoggerData::Task const logHead(DOCUMENT_PATH + " [head]"); static LoggerData::Task const logIllegal(DOCUMENT_PATH + " [illegal]"); LoggerData::Task const * task = &logCreate; @@ -81,9 +89,10 @@ HttpHandler::status_e RestDocumentHandler::execute () { switch (type) { case HttpRequest::HTTP_REQUEST_DELETE: task = &logDelete; break; case HttpRequest::HTTP_REQUEST_GET: task = &logRead; break; + case HttpRequest::HTTP_REQUEST_HEAD: task = &logHead; break; + case HttpRequest::HTTP_REQUEST_ILLEGAL: task = &logIllegal; break; case HttpRequest::HTTP_REQUEST_POST: task = &logCreate; break; case HttpRequest::HTTP_REQUEST_PUT: task = &logUpdate; break; - case HttpRequest::HTTP_REQUEST_ILLEGAL: task = &logIllegal; break; } _timing << *task; @@ -92,16 +101,22 @@ HttpHandler::status_e RestDocumentHandler::execute () { // execute one of the CRUD methods bool res = false; - switch (type) { - case HttpRequest::HTTP_REQUEST_POST: res = createDocument(); break; - case HttpRequest::HTTP_REQUEST_GET: res = readDocument(); break; - case HttpRequest::HTTP_REQUEST_PUT: res = updateDocument(); break; - case HttpRequest::HTTP_REQUEST_DELETE: res = deleteDocument(); break; + if (request->suffix().size() < 1) { + generateError(HttpResponse::BAD, "missing collection identifier"); + } + else { + switch (type) { + case HttpRequest::HTTP_REQUEST_DELETE: res = deleteDocument(); break; + case HttpRequest::HTTP_REQUEST_GET: res = readDocument(); break; + case HttpRequest::HTTP_REQUEST_HEAD: res = checkDocument(); break; + case HttpRequest::HTTP_REQUEST_POST: res = createDocument(); break; + case HttpRequest::HTTP_REQUEST_PUT: res = updateDocument(); break; - case HttpRequest::HTTP_REQUEST_ILLEGAL: - res = false; - generateNotImplemented("ILLEGAL " + DOCUMENT_PATH); - break; + case HttpRequest::HTTP_REQUEST_ILLEGAL: + res = false; + generateNotImplemented("ILLEGAL " + DOCUMENT_PATH); + break; + } } _timingResult = res ? RES_ERR : RES_OK; @@ -126,39 +141,50 @@ HttpHandler::status_e RestDocumentHandler::execute () { //////////////////////////////////////////////////////////////////////////////// /// @brief creates a document /// -/// @REST{POST /_document/@FA{collection-identifier}} +/// @REST{POST /collection/@FA{collection-identifier}} /// /// Creates a new document in the collection identified by the /// @FA{collection-identifier}. A JSON representation of the document must be -/// passed in the body of the POST request. If the document was created, then a -/// @CODE{HTTP 201} is returned and the "Location" header contains the path to the -/// newly created document. The "ETag" contains the revision of the newly -/// created document. +/// passed as the body of the POST request. +/// +/// If the document was created successfully, then a @LIT{HTTP 201} is returned +/// and the "Location" header contains the path to the newly created +/// document. The "ETag" header field contains the revision of the newly created +/// document. +/// +/// If the @FA{collection-identifier} is unknown, then a @LIT{HTTP 404} is +/// returned. +/// +/// If the body does not contain a valid JSON representation of an document, +/// then a @LIT{HTTP 400} is returned. +/// +/// Instead of a @FA{collection-identifier}, a collection name can be +/// given. +/// +/// @EXAMPLES +/// +/// Create a document given a collection identifier: /// /// @verbinclude rest3 /// -/// If the @FA{collection-identifier} is unknown, then a @CODE{HTTP 404} is -/// returned. +/// Unknown collection identifier: /// /// @verbinclude rest4 /// -/// If the body does not contain a valid JSON representation of an document, -/// then a @CODE{HTTP 400} is returned. +/// Illegal document: /// /// @verbinclude rest5 /// -/// @REST{POST /_document/@FA{collection-name}} -/// -/// Creates a new document in the collection named @FA{collection-name}. +/// Create a document given a collection name: /// /// @verbinclude rest6 //////////////////////////////////////////////////////////////////////////////// -bool RestDocumentHandler::createDocument () { +bool RestCollectionHandler::createDocument () { vector const& suffix = request->suffix(); if (suffix.size() != 1) { - generateError(HttpResponse::BAD, "missing collection identifier"); + generateError(HttpResponse::BAD, "superfluous identifier"); return false; } @@ -214,35 +240,126 @@ bool RestDocumentHandler::createDocument () { } //////////////////////////////////////////////////////////////////////////////// -/// @brief reads a document +/// @brief reads a single or all documents /// -/// @REST{GET /_document/@FA{document-reference}} +/// Either readSingleDocument or readAllDocuments. +//////////////////////////////////////////////////////////////////////////////// + +bool RestCollectionHandler::readDocument () { + switch (request->suffix().size()) { + case 1: + return readAllDocuments(); + + case 2: + return readSingleDocument(true); + + default: + generateError(HttpResponse::BAD, "superfluous identifier"); + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief reads a single document /// -/// Returns the document referenced by @FA{document-reference}. If the document -/// exists, then a @CODE{HTTP 200} is returned and the JSON representation of the -/// document is the body of the response. +/// @REST{GET /collection/@FA{collection-identifier}/@FA{document-identifier}} +/// +/// Returns the document identified by @FA{document-identifier} from the +/// collection identified by @FA{collection-identifier}. +/// +/// If the document exists, then a @LIT{HTTP 200} is returned and the JSON +/// representation of the document is the body of the response. +/// +/// If the collection identifier points to a non-existing collection, then a +/// @LIT{HTTP 404} is returned and the body contains an error document. +/// +/// If the document identifier points to a non-existing document, then a +/// @LIT{HTTP 404} is returned and the body contains an error document. +/// +/// Instead of a @FA{document-identifier}, a document reference can be given. A +/// @LIT{HTTP 400} is returned, if there is a mismatch between the +/// @FA{collection-identifier} and the @FA{document-reference}. +/// +/// Instead of a @FA{collection-identifier}, a collection name can be given. +/// +/// @EXAMPLES +/// +/// Use a collection and document identfier: /// /// @verbinclude rest1 /// -/// If the document-reference points to a non-existing document, then a -/// @CODE{HTTP 404} is returned and the body contains an error document. +/// Use a collection name and document reference: +/// +/// @verbinclude rest18 +/// +/// Unknown document identifier: /// /// @verbinclude rest2 +/// +/// Unknown collection identifier: +/// +/// @verbinclude rest17 //////////////////////////////////////////////////////////////////////////////// -bool RestDocumentHandler::readDocument () { - vector suffix = request->suffix(); +bool RestCollectionHandler::readSingleDocument (bool generateBody) { + vector const& suffix = request->suffix(); - // split the document reference - if (suffix.size() == 1) { - suffix = splitDocumentReference(suffix[0]); - } + // find and load collection given by name oder identifier + bool ok = findCollection(suffix[0]) && loadCollection(); - if (suffix.size() != 2) { - generateError(HttpResponse::BAD, "missing collection or document identifier"); + if (! ok) { return false; } + // split the document reference + string did; + ok = splitDocumentReference(suffix[1], did); + + if (! ok) { + return false; + } + + // ............................................................................. + // inside read transaction + // ............................................................................. + + _documentCollection->beginRead(_documentCollection); + + TRI_doc_mptr_t const* document = findDocument(did); + + _documentCollection->endRead(_documentCollection); + + // ............................................................................. + // outside read transaction + // ............................................................................. + + if (document == 0) { + generateDocumentNotFound(suffix[0], did); + return false; + } + + generateDocument(document, generateBody); + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief reads all documents +/// +/// @REST{GET /collection/@FA{collection-identifier}} +/// +/// Returns the URI for all documents from the collection identified by +/// @FA{collection-identifier}. +/// +/// Instead of a @FA{collection-identifier}, a collection name can be given. +/// +/// @EXAMPLES +/// +/// @verbinclude rest20 +//////////////////////////////////////////////////////////////////////////////// + +bool RestCollectionHandler::readAllDocuments () { + vector const& suffix = request->suffix(); + // find and load collection given by name oder identifier bool ok = findCollection(suffix[0]) && loadCollection(); @@ -254,78 +371,136 @@ bool RestDocumentHandler::readDocument () { // inside read transaction // ............................................................................. + vector ids; + _documentCollection->beginRead(_documentCollection); - findDocument(suffix[1]); + TRI_sim_collection_t* collection = (TRI_sim_collection_t*) _documentCollection; + if (0 < collection->_primaryIndex._nrUsed) { + void** ptr = collection->_primaryIndex._table; + void** end = collection->_primaryIndex._table + collection->_primaryIndex._nrAlloc; + + for (; ptr < end; ++ptr) { + if (*ptr) { + TRI_doc_mptr_t const* d = (TRI_doc_mptr_t const*) *ptr; + + if (d->_deletion == 0) { + ids.push_back(d->_did); + } + } + } + } + _documentCollection->endRead(_documentCollection); // ............................................................................. // outside read transaction // ............................................................................. - if (_resultSet == 0) { - generateError(HttpResponse::SERVER_ERROR, "cannot execute find"); - return false; + TRI_string_buffer_t buffer; + + TRI_InitStringBuffer(&buffer); + + TRI_AppendStringStringBuffer(&buffer, "{ \"documents\" : [\n"); + + bool first = true; + string prefix = "\"" + DOCUMENT_PATH + "/" + StringUtils::itoa(_documentCollection->base._cid) + "/"; + + for (vector::iterator i = ids.begin(); i != ids.end(); ++i) { + TRI_AppendString2StringBuffer(&buffer, prefix.c_str(), prefix.size()); + TRI_AppendUInt64StringBuffer(&buffer, *i); + + if (first) { + prefix = "\",\n" + prefix; + first = false; + } } - if (! _resultSet->hasNext(_resultSet)) { - generateDocumentNotFound(suffix[0], suffix[1]); - return false; - } + TRI_AppendStringStringBuffer(&buffer, "\"\n] }\n"); + + // and generate a response + response = new HttpResponse(HttpResponse::OK); + response->setContentType("application/json"); + + response->body().appendText(TRI_BeginStringBuffer(&buffer), TRI_LengthStringBuffer(&buffer)); + + TRI_DestroyStringBuffer(&buffer); - generateResultSetNext(); return true; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief reads a single document head +/// +/// @REST{HEAD /collection/@FA{collection-identifier}/@FA{document-identifier}} +/// +/// Like @FN{GET}, but does not return the body. +/// +/// @EXAMPLES +/// +/// @verbinclude rest19 +//////////////////////////////////////////////////////////////////////////////// + +bool RestCollectionHandler::checkDocument () { + return readSingleDocument(false); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief updates a document /// -/// @REST{PUT /_document/@FA{document-reference}} +/// @REST{PUT /collection/@FA{collection-identifier}/@FA{document-identifier}} /// -/// Updates the document referenced by @FA{document-reference}. If the document -/// exists and could be updated, then a @CODE{HTTP 201} is returned and the -/// "ETag" header contains the new revision of the document. +/// Updates the document identified by @FA{document-identifier} in the +/// collection identified by @FA{collection-identifier}. If the document exists +/// and could be updated, then a @LIT{HTTP 201} is returned and the "ETag" +/// header field contains the new revision of the document. /// -/// @verbinclude rest7 -/// -/// If the document does not exists, then a @CODE{HTTP 404} is returned. -/// -/// @verbinclude rest8 +/// If the document does not exists, then a @LIT{HTTP 404} is returned. /// /// If an etag is supplied in the "ETag" field, then the AvocadoDB checks that /// the revision of the document is equal to the etag. If there is a mismatch, -/// then a @CODE{HTTP 409} conflict is returned and no update is performed. +/// then a @LIT{HTTP 409} conflict is returned and no update is performed. /// -/// @verbinclude rest9 +/// Instead of a @FA{document-identifier}, a document reference can be given. /// -/// @REST{PUT /_document/@FA{document-reference}?policy=@FA{policy}} +/// Instead of a @FA{collection-identifier}, a collection name can be given. /// -/// As before, if @FA{policy} is @CODE{error}. If @FA{policy} is @CODE{last}, +/// @REST{PUT /collection/@FA{collection-identifier}/@FA{document-identifier}?policy=@FA{policy}} +/// +/// As before, if @FA{policy} is @LIT{error}. If @FA{policy} is @LIT{last}, /// then the last write will win. /// -/// @verbinclude rest10 -/// -/// @REST{PUT /_document/@FA{document-reference}?_rev=@FA{etag}} +/// @REST{PUT /collection/@FA{collection-identifier}/@FA{document-identifier}?_rev=@FA{etag}} /// /// You can also supply the etag using the parameter "_rev" instead of an "ETag" /// header. /// +/// @EXAMPLES +/// +/// Using collection and document identifier: +/// +/// @verbinclude rest7 +/// +/// Unknown document identifier: +/// +/// @verbinclude rest8 +/// +/// Produce a revision conflict: +/// +/// @verbinclude rest9 +/// +/// Last write wins: +/// +/// @verbinclude rest10 +/// +/// Alternative to ETag header field: +/// /// @verbinclude rest11 //////////////////////////////////////////////////////////////////////////////// -bool RestDocumentHandler::updateDocument () { - vector suffix = request->suffix(); - - // split the document reference - if (suffix.size() == 1) { - suffix = splitDocumentReference(suffix[0]); - } - - if (suffix.size() != 2) { - generateError(HttpResponse::BAD, "missing collection or document identifier"); - return false; - } +bool RestCollectionHandler::updateDocument () { + vector const& suffix = request->suffix(); // find and load collection given by name oder identifier bool ok = findCollection(suffix[0]) && loadCollection(); @@ -334,6 +509,14 @@ bool RestDocumentHandler::updateDocument () { return false; } + // split the document reference + string didStr; + ok = splitDocumentReference(suffix[1], didStr); + + if (! ok) { + return false; + } + // parse document TRI_json_t* json = parseJsonBody(); @@ -342,7 +525,7 @@ bool RestDocumentHandler::updateDocument () { } // extract document identifier - TRI_voc_did_t did = StringUtils::uint64(suffix[1]); + TRI_voc_did_t did = StringUtils::uint64(didStr); // extract the revision TRI_voc_rid_t revision = extractRevision(); @@ -379,11 +562,11 @@ bool RestDocumentHandler::updateDocument () { return false; } else if (TRI_errno() == TRI_VOC_ERROR_DOCUMENT_NOT_FOUND) { - generateDocumentNotFound(suffix[0], suffix[1]); + generateDocumentNotFound(suffix[0], didStr); return false; } else if (TRI_errno() == TRI_VOC_ERROR_CONFLICT) { - generateConflict(suffix[0], suffix[1]); + generateConflict(suffix[0], didStr); return false; } else { @@ -396,47 +579,50 @@ bool RestDocumentHandler::updateDocument () { //////////////////////////////////////////////////////////////////////////////// /// @brief deletes a document /// -/// @REST{DELETE /_document/@FA{document-reference}} +/// @REST{DELETE /collection/@FA{collection-identifier}/@FA{document-identifier}} /// -/// Deletes the document referenced by @FA{document-reference}. If the document -/// exists and could be deleted, then a @CODE{HTTP 204} is returned. +/// Deletes the document identified by @FA{document-identifier} from the +/// collection identified by @FA{collection-identifier}. If the document exists +/// and could be deleted, then a @LIT{HTTP 204} is returned. /// -/// @verbinclude rest13 -/// -/// If the document does not exists, then a @CODE{HTTP 404} is returned. -/// -/// @verbinclude rest14 +/// If the document does not exists, then a @LIT{HTTP 404} is returned. /// /// If an etag is supplied in the "ETag" field, then the AvocadoDB checks that /// the revision of the document is equal to the etag. If there is a mismatch, -/// then a @CODE{HTTP 409} conflict is returned and no delete is performed. +/// then a @LIT{HTTP 409} conflict is returned and no delete is performed. /// -/// @verbinclude rest12 +/// Instead of a @FA{document-identifier}, a document reference can be given. /// -/// @REST{DELETE /_document/@FA{document-reference}?policy=@FA{policy}} +/// Instead of a @FA{collection-identifier}, a collection name can be given. /// -/// As before, if @FA{policy} is @CODE{error}. If @FA{policy} is @CODE{last}, -/// then the last write will win. +/// @REST{DELETE /collection/@FA{collection-identifier}/@FA{document-identifier}?policy=@FA{policy}} /// -/// @REST{DELETE /_document/@FA{document-reference}? _rev=@FA{etag}} +/// As before, if @FA{policy} is @LIT{error}. If @FA{policy} is @LIT{last}, then +/// the last write will win. +/// +/// @REST{DELETE /collection/@FA{collection-identifier}/@FA{document-identifier}? _rev=@FA{etag}} /// /// You can also supply the etag using the parameter "_rev" instead of an "ETag" /// header. +/// +/// @EXAMPLES +/// +/// Using collection and document identifier: +/// +/// @verbinclude rest13 +/// +/// Unknown document identifier: +/// +/// @verbinclude rest14 +/// +/// Revision conflict: +/// +/// @verbinclude rest12 //////////////////////////////////////////////////////////////////////////////// -bool RestDocumentHandler::deleteDocument () { +bool RestCollectionHandler::deleteDocument () { vector suffix = request->suffix(); - // split the document reference - if (suffix.size() == 1) { - suffix = splitDocumentReference(suffix[0]); - } - - if (suffix.size() != 2) { - generateError(HttpResponse::BAD, "missing collection or document identifier"); - return false; - } - // find and load collection given by name oder identifier bool ok = findCollection(suffix[0]) && loadCollection(); @@ -444,8 +630,16 @@ bool RestDocumentHandler::deleteDocument () { return false; } + // split the document reference + string didStr; + ok = splitDocumentReference(suffix[1], didStr); + + if (! ok) { + return false; + } + // extract document identifier - TRI_voc_did_t did = StringUtils::uint64(suffix[1]); + TRI_voc_did_t did = StringUtils::uint64(didStr); // extract the revision TRI_voc_rid_t revision = extractRevision(); @@ -477,11 +671,11 @@ bool RestDocumentHandler::deleteDocument () { return false; } else if (TRI_errno() == TRI_VOC_ERROR_DOCUMENT_NOT_FOUND) { - generateDocumentNotFound(suffix[0], suffix[1]); + generateDocumentNotFound(suffix[0], didStr); return false; } else if (TRI_errno() == TRI_VOC_ERROR_CONFLICT) { - generateConflict(suffix[0], suffix[1]); + generateConflict(suffix[0], didStr); return false; } else { diff --git a/VocBase/result-set.h b/RestHandler/RestCollectionHandler.h similarity index 54% rename from VocBase/result-set.h rename to RestHandler/RestCollectionHandler.h index c7ff95bfd9..d5f89f1c07 100644 --- a/VocBase/result-set.h +++ b/RestHandler/RestCollectionHandler.h @@ -1,11 +1,11 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief result set +/// @brief document request handler /// /// @file /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,145 +22,81 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2011, triagens GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_DURHAM_VOC_BASE_RESULT_SET_H -#define TRIAGENS_DURHAM_VOC_BASE_RESULT_SET_H 1 +#ifndef TRIAGENS_REST_HANDLER_REST_COLLECTION_HANDLER_H +#define TRIAGENS_REST_HANDLER_REST_COLLECTION_HANDLER_H 1 -#include "VocBase/vocbase.h" +#include "RestHandler/RestVocbaseBaseHandler.h" -#include "BasicsC/json.h" -#include "BasicsC/locks.h" -#include "ShapedJson/shaped-json.h" -#include "VocBase/datafile.h" +//////////////////////////////////////////////////////////////////////////////// +/// @page RestDocumentTOC +/// +///
      +///
    1. @ref RestCollectionCreate "POST /collection/@FA{}"
    2. +///
    3. @ref RestCollectionRead "GET /collection/@FA{}/@FA{}"
    4. +///
    5. @ref RestCollectionReadAll "GET /collection/@FA{}"
    6. +///
    7. @ref RestCollectionUpdate "PUT /collection/@FA{}/@FA{}"
    8. +///
    9. @ref RestCollectionDelete "DELETE /collection/@FA{}/@FA{}"
    10. +///
    11. @ref RestCollectionHead "HEAD /collection/@FA{}/@FA{}"
    12. +///
    +//////////////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus -extern "C" { -#endif +//////////////////////////////////////////////////////////////////////////////// +/// @page RestDocument REST Interface for Documents +/// +/// The basic operations (create, read, update, delete) for documents are mapped +/// to the standard HTTP methods (POST, GET, PUT, DELETE). An identifier for the +/// revision is returned in the "ETag" field. If you modify a document, you can +/// use the "ETag" field to detect conflicts. The revision of a document can be +/// checking using the HTTP method HEAD. +/// +///
    +/// @copydoc RestDocumentTOC +///
    +/// +/// @anchor RestCollectionCreate +/// @copydetails triagens::avocado::RestCollectionHandler::createDocument +///
    +/// +/// @anchor RestCollectionRead +/// @copydetails triagens::avocado::RestCollectionHandler::readSingleDocument +///
    +/// +/// @anchor RestCollectionReadAll +/// @copydetails triagens::avocado::RestCollectionHandler::readAllDocuments +///
    +/// +/// @anchor RestCollectionUpdate +/// @copydetails triagens::avocado::RestCollectionHandler::updateDocument +///
    +/// +/// @anchor RestCollectionDelete +/// @copydetails triagens::avocado::RestCollectionHandler::deleteDocument +///
    +/// +/// @anchor RestCollectionHead +/// @copydetails triagens::avocado::RestCollectionHandler::checkDocument +//////////////////////////////////////////////////////////////////////////////// // ----------------------------------------------------------------------------- -// --SECTION-- forward declarations -// ----------------------------------------------------------------------------- - -struct TRI_doc_collection_s; -struct TRI_doc_mptr_s; -struct TRI_rs_container_s; -struct TRI_rs_container_element_s; - -// ----------------------------------------------------------------------------- -// --SECTION-- public types +// --SECTION-- RestCollectionHandler // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase +/// @addtogroup AvocadoDB /// @{ //////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -/// @brief an identifier for result sets -//////////////////////////////////////////////////////////////////////////////// - -typedef TRI_voc_tick_t TRI_rs_id_t; +namespace triagens { + namespace avocado { //////////////////////////////////////////////////////////////////////////////// -/// @brief information about the execution +/// @brief collection request handler //////////////////////////////////////////////////////////////////////////////// -typedef struct TRI_rs_info_s { - char* _cursor; - - TRI_voc_size_t _scannedIndexEntries; - TRI_voc_size_t _scannedDocuments; - TRI_voc_size_t _matchedDocuments; - - double _runtime; -} -TRI_rs_info_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief result set entry -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_rs_entry_s { - TRI_shaped_json_t _document; - TRI_json_t _augmented; - TRI_df_marker_type_e _type; - - TRI_voc_did_t _did; - TRI_voc_rid_t _rid; - - TRI_voc_cid_t _fromCid; - TRI_voc_did_t _fromDid; - - TRI_voc_cid_t _toCid; - TRI_voc_did_t _toDid; -} -TRI_rs_entry_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief a result set -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_result_set_s { - TRI_rs_id_t _id; - TRI_rs_info_t _info; - - struct TRI_rs_container_element_s* _containerElement; - - char* _error; - - bool (*hasNext) (struct TRI_result_set_s*); - TRI_rs_entry_t const* (*next) (struct TRI_result_set_s*); - TRI_voc_size_t (*count) (struct TRI_result_set_s*, bool current); - - void (*free) (struct TRI_result_set_s*); -} -TRI_result_set_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief result set container element type -//////////////////////////////////////////////////////////////////////////////// - -typedef enum { - TRI_RSCE_RESULT_SET, - TRI_RSCE_DATAFILE -} -TRI_rs_container_element_type_e; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief result set container element -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_rs_container_element_s { - struct TRI_rs_container_element_s* _prev; - struct TRI_rs_container_element_s* _next; - - struct TRI_rs_container_s* _container; - - TRI_rs_container_element_type_e _type; - - TRI_result_set_t* _resultSet; - - struct TRI_datafile_s* _datafile; - void* _datafileData; - void (*datafileCallback) (struct TRI_datafile_s*, void*); -} -TRI_rs_container_element_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief a result set container for all result sets of a collection -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_rs_container_s { - struct TRI_doc_collection_s* _collection; - - TRI_spin_t _lock; - - TRI_rs_container_element_t* _begin; - TRI_rs_container_element_t* _end; -} -TRI_rs_container_t; + class RestCollectionHandler : public RestVocbaseBaseHandler { //////////////////////////////////////////////////////////////////////////////// /// @} @@ -171,83 +107,102 @@ TRI_rs_container_t; // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase +/// @addtogroup AvocadoDB /// @{ //////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -/// @brief initialises a result set container -//////////////////////////////////////////////////////////////////////////////// - -void TRI_InitRSContainer (TRI_rs_container_t*, struct TRI_doc_collection_s*); + public: //////////////////////////////////////////////////////////////////////////////// -/// @brief destroys a result set container +/// @brief constructor //////////////////////////////////////////////////////////////////////////////// -void TRI_DestroyRSContainer (TRI_rs_container_t*); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a single result set -//////////////////////////////////////////////////////////////////////////////// - -TRI_result_set_t* TRI_CreateRSSingle (struct TRI_doc_collection_s* collection, - TRI_rs_container_element_t* containerElement, - struct TRI_doc_mptr_s const* header, - TRI_voc_size_t total); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a full result set -//////////////////////////////////////////////////////////////////////////////// - -TRI_result_set_t* TRI_CreateRSVector (struct TRI_doc_collection_s* collection, - TRI_rs_container_element_t* containerElement, - struct TRI_doc_mptr_s const** header, - TRI_json_t const* augmented, - TRI_voc_size_t length, - TRI_voc_size_t total); + RestCollectionHandler (rest::HttpRequest* request, struct TRI_vocbase_s* vocbase); //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// // ----------------------------------------------------------------------------- -// --SECTION-- public functions +// --SECTION-- Handler methods // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase +/// @addtogroup AvocadoDB /// @{ //////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -/// @brief adds a result set to the end of the doubly linked list -//////////////////////////////////////////////////////////////////////////////// - -TRI_rs_container_element_t* TRI_AddResultSetRSContainer (TRI_rs_container_t* container); + public: //////////////////////////////////////////////////////////////////////////////// -/// @brief adds an callback to the result set container +/// {@inheritDoc} //////////////////////////////////////////////////////////////////////////////// -TRI_rs_container_element_t* TRI_AddDatafileRSContainer (TRI_rs_container_t* container, - struct TRI_datafile_s* datafile, - void (*callback) (struct TRI_datafile_s*, void*), - void*); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief removes a result set from the doubly linked list -//////////////////////////////////////////////////////////////////////////////// - -void TRI_RemoveRSContainer (TRI_rs_container_element_t* element); + status_e execute (); //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus +// ----------------------------------------------------------------------------- +// --SECTION-- private methods +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup AvocadoDB +/// @{ +//////////////////////////////////////////////////////////////////////////////// + + private: + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a document +//////////////////////////////////////////////////////////////////////////////// + + bool createDocument (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief reads a single or all documents +//////////////////////////////////////////////////////////////////////////////// + + bool readDocument (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief reads a single document +//////////////////////////////////////////////////////////////////////////////// + + bool readSingleDocument (bool generateBody); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief reads all documents +//////////////////////////////////////////////////////////////////////////////// + + bool readAllDocuments (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief updates a document +//////////////////////////////////////////////////////////////////////////////// + + bool updateDocument (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief deletes a document +//////////////////////////////////////////////////////////////////////////////// + + bool deleteDocument (); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief reads a single document head +//////////////////////////////////////////////////////////////////////////////// + + bool checkDocument (); + }; + } } -#endif + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// #endif diff --git a/RestHandler/RestSystemActionHandler.cpp b/RestHandler/RestSystemActionHandler.cpp index f5ebd7987a..7667dbcb21 100644 --- a/RestHandler/RestSystemActionHandler.cpp +++ b/RestHandler/RestSystemActionHandler.cpp @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,7 +22,7 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// #include "RestSystemActionHandler.h" diff --git a/RestHandler/RestSystemActionHandler.h b/RestHandler/RestSystemActionHandler.h index 4f86d5f6aa..9492db71ac 100644 --- a/RestHandler/RestSystemActionHandler.h +++ b/RestHandler/RestSystemActionHandler.h @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,11 +22,11 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_SYSTEM_ACTION_HANDLER_H -#define TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_SYSTEM_ACTION_HANDLER_H 1 +#ifndef TRIAGENS_REST_HANDLER_REST_SYSTEM_ACTION_HANDLER_H +#define TRIAGENS_REST_HANDLER_REST_SYSTEM_ACTION_HANDLER_H 1 #include "RestHandler/RestActionHandler.h" diff --git a/RestHandler/RestVocbaseBaseHandler.cpp b/RestHandler/RestVocbaseBaseHandler.cpp index d782fd829b..a2738be558 100644 --- a/RestHandler/RestVocbaseBaseHandler.cpp +++ b/RestHandler/RestVocbaseBaseHandler.cpp @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,20 +22,16 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// #include "RestVocbaseBaseHandler.h" -#include -#include - -#include - -#include -#include - +#include "Basics/StringUtils.h" +#include "BasicsC/string-buffer.h" +#include "Rest/HttpRequest.h" #include "ShapedJson/shaped-json.h" +#include "VocBase/document-collection.h" using namespace std; using namespace triagens::basics; @@ -89,13 +85,13 @@ string RestVocbaseBaseHandler::SYSTEM_ACTION_PATH = "/_system"; /// @brief document path //////////////////////////////////////////////////////////////////////////////// -string RestVocbaseBaseHandler::DOCUMENT_PATH = "/_document"; +string RestVocbaseBaseHandler::DOCUMENT_PATH = "/collection"; //////////////////////////////////////////////////////////////////////////////// /// @brief collection path //////////////////////////////////////////////////////////////////////////////// -string RestVocbaseBaseHandler::COLLECTION_PATH = "/_collection"; +string RestVocbaseBaseHandler::COLLECTION_PATH = "/collection"; //////////////////////////////////////////////////////////////////////////////// /// @} @@ -119,7 +115,7 @@ RestVocbaseBaseHandler::RestVocbaseBaseHandler (HttpRequest* request, TRI_vocbas _vocbase(vocbase), _collection(0), _documentCollection(0), - _resultSet(0), + _barrier(0), _timing(), _timingResult(RES_FAIL) { } @@ -129,8 +125,8 @@ RestVocbaseBaseHandler::RestVocbaseBaseHandler (HttpRequest* request, TRI_vocbas //////////////////////////////////////////////////////////////////////////////// RestVocbaseBaseHandler::~RestVocbaseBaseHandler () { - if (_resultSet != 0) { - _resultSet->free(_resultSet); + if (_barrier != 0) { + TRI_FreeBarrier(_barrier); } LOGGER_REQUEST_IN_END_I(_timing) << _timingResult; @@ -175,7 +171,7 @@ void RestVocbaseBaseHandler::generateCreated (TRI_voc_cid_t cid, TRI_voc_did_t d response = new HttpResponse(HttpResponse::CREATED); response->setHeader("ETag", "\"" + StringUtils::itoa(rid) + "\""); - response->setHeader("location", DOCUMENT_PATH + "/" + StringUtils::itoa(cid) + ":" + StringUtils::itoa(did)); + response->setHeader("location", DOCUMENT_PATH + "/" + StringUtils::itoa(cid) + "/" + StringUtils::itoa(did)); } //////////////////////////////////////////////////////////////////////////////// @@ -191,7 +187,7 @@ void RestVocbaseBaseHandler::generateCollectionNotFound (string const& cid) { //////////////////////////////////////////////////////////////////////////////// void RestVocbaseBaseHandler::generateDocumentNotFound (string const& cid, string const& did) { - generateError(HttpResponse::NOT_FOUND, "document " + DOCUMENT_PATH + "/" + cid + ":" + did + " not found"); + generateError(HttpResponse::NOT_FOUND, "document " + DOCUMENT_PATH + "/" + cid + "/" + did + " not found"); } //////////////////////////////////////////////////////////////////////////////// @@ -199,7 +195,7 @@ void RestVocbaseBaseHandler::generateDocumentNotFound (string const& cid, string //////////////////////////////////////////////////////////////////////////////// void RestVocbaseBaseHandler::generateConflict (string const& cid, string const& did) { - generateError(HttpResponse::CONFLICT, "document " + DOCUMENT_PATH + "/" + cid + ":" + did + " is been altered"); + generateError(HttpResponse::CONFLICT, "document " + DOCUMENT_PATH + "/" + cid + "/" + did + " has been altered"); } //////////////////////////////////////////////////////////////////////////////// @@ -214,56 +210,74 @@ void RestVocbaseBaseHandler::generateNotImplemented (string const& path) { /// @brief generates next entry from a result set //////////////////////////////////////////////////////////////////////////////// -void RestVocbaseBaseHandler::generateResultSetNext () { - if (_resultSet == 0 || ! _resultSet->hasNext(_resultSet)) { - generateError(HttpResponse::SERVER_ERROR, "result set is empty"); +void RestVocbaseBaseHandler::generateDocument (TRI_doc_mptr_t const* document, + bool generateDocument) { + if (document == 0 || _documentCollection == 0) { + generateError(HttpResponse::SERVER_ERROR, "document or collection is null"); return; } - TRI_doc_collection_t* collection = _resultSet->_containerElement->_container->_collection; - - // executes a result set query - TRI_rs_entry_t const* entry = _resultSet->next(_resultSet); - // add document identifier to buffer - string id = StringUtils::itoa(_collection->_cid) + ":" + StringUtils::itoa(entry->_did); - - TRI_json_t augmented; - - if (entry->_augmented._type != TRI_JSON_ARRAY) { - augmented._type = TRI_JSON_ARRAY; - TRI_InitVector(&augmented._value._objects, sizeof(TRI_json_t)); - } - else { - TRI_CopyToJson(&augmented, &entry->_augmented); - } - - TRI_Insert2ArrayJson(&augmented, "_id", TRI_CreateStringCopyJson(id.c_str())); - - // convert object to string TRI_string_buffer_t buffer; - TRI_InitStringBuffer(&buffer); - TRI_StringifyAugmentedShapedJson(collection->_shaper, &buffer, &entry->_document, &augmented); + if (generateDocument) { + string id = StringUtils::itoa(_documentCollection->base._cid) + ":" + StringUtils::itoa(document->_did); - TRI_DestroyJson(&augmented); + TRI_json_t augmented; + + TRI_InitArrayJson(&augmented); + + TRI_Insert2ArrayJson(&augmented, "_id", TRI_CreateStringCopyJson(id.c_str())); + TRI_Insert2ArrayJson(&augmented, "_rev", TRI_CreateNumberJson(document->_rid)); + + // convert object to string + TRI_InitStringBuffer(&buffer); + + TRI_StringifyAugmentedShapedJson(_documentCollection->_shaper, &buffer, &document->_document, &augmented); + + TRI_DestroyJson(&augmented); + } // and generate a response response = new HttpResponse(HttpResponse::OK); response->setContentType("application/json"); - response->setHeader("ETag", "\"" + StringUtils::itoa(entry->_rid) + "\""); + response->setHeader("ETag", "\"" + StringUtils::itoa(document->_rid) + "\""); - response->body().appendText(TRI_BeginStringBuffer(&buffer), TRI_LengthStringBuffer(&buffer)); + if (generateDocument) { + response->body().appendText(TRI_BeginStringBuffer(&buffer), TRI_LengthStringBuffer(&buffer)); - TRI_DestroyStringBuffer(&buffer); + TRI_DestroyStringBuffer(&buffer); + } } //////////////////////////////////////////////////////////////////////////////// /// @brief splits a document reference into to parts //////////////////////////////////////////////////////////////////////////////// -vector RestVocbaseBaseHandler::splitDocumentReference (string const& name) { - return StringUtils::split(name, ":"); +bool RestVocbaseBaseHandler::splitDocumentReference (string const& name, string& did) { + vector doc = StringUtils::split(name, ":"); + + switch (doc.size()) { + case 1: + did = doc[0]; + break; + + case 2: + did = doc[1]; + + if (StringUtils::uint64(doc[0]) != _documentCollection->base._cid) { + generateError(HttpResponse::BAD, "cross-collection object reference"); + return false; + } + + break; + + default: + generateError(HttpResponse::BAD, "missing or illegal document identifier"); + return false; + } + + return true; } //////////////////////////////////////////////////////////////////////////////// @@ -437,14 +451,9 @@ TRI_json_t* RestVocbaseBaseHandler::parseJsonBody () { /// @brief sets the restult-set, needs a loaded collection //////////////////////////////////////////////////////////////////////////////// -void RestVocbaseBaseHandler::findDocument (string const& doc) { - if (_resultSet != 0) { - _resultSet->free(_resultSet); - _resultSet = 0; - } - +TRI_doc_mptr_t const* RestVocbaseBaseHandler::findDocument (string const& doc) { if (_documentCollection == 0) { - return; + return 0; } uint32_t id = StringUtils::uint32(doc); @@ -456,15 +465,19 @@ void RestVocbaseBaseHandler::findDocument (string const& doc) { _documentCollection->beginRead(_documentCollection); TRI_doc_mptr_t const* document = _documentCollection->read(_documentCollection, id); - TRI_rs_container_element_t* ce = TRI_AddResultSetRSContainer(&_documentCollection->_resultSets); - _resultSet = TRI_CreateRSSingle(_documentCollection, ce, document, 1); + // keep the oldest barrier + if (_barrier != 0) { + _barrier = TRI_CreateBarrierElement(&_documentCollection->_barrierList); + } _documentCollection->endRead(_documentCollection); // ............................................................................. // outside read transaction // ............................................................................. + + return document; } //////////////////////////////////////////////////////////////////////////////// diff --git a/RestHandler/RestVocbaseBaseHandler.h b/RestHandler/RestVocbaseBaseHandler.h index 209ab4524b..aafdbf1a09 100644 --- a/RestHandler/RestVocbaseBaseHandler.h +++ b/RestHandler/RestVocbaseBaseHandler.h @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2004-2012 triagens 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. @@ -22,38 +22,24 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2010-2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_VOCBASE_BASE_HANDLER_H -#define TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_VOCBASE_BASE_HANDLER_H 1 +#ifndef TRIAGENS_REST_HANDLER_REST_VOCBASE_BASE_HANDLER_H +#define TRIAGENS_REST_HANDLER_REST_VOCBASE_BASE_HANDLER_H 1 -#include +#include "Admin/RestBaseHandler.h" -#include -#include -#include +#include "Logger/Logger.h" +#include "Rest/HttpResponse.h" +#include "VocBase/document-collection.h" //////////////////////////////////////////////////////////////////////////////// /// @page HttpInterface Lightweight HTTP Interface /// -/// The AvocadoDB has a REST interface for accessing the resources. It provides -/// a lightweight HTTP interface to execute actions. Actions are small -/// JavaScript functions which encapsulate business logic. Actions are -/// accessible via HTTP. -/// -/// Next steps: learn more about -/// -/// - the @ref RestInterface -/// - the @ref RestDocument -/// -/// Advanced Topics: learn more about -/// -/// - @ref Actions -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @page RestInterface REST Interface +/// The AvocadoDB has a REST interface for accessing the resources. It +/// also provides a lightweight HTTP interface to execute actions. Actions are +/// small JavaScript functions which encapsulate business logic. /// /// Each resource has an identifier, which allows to access the given resource. /// @@ -76,6 +62,10 @@ /// Next steps: learn more about /// /// - the @ref RestDocument +/// +/// Advanced Topics: learn more about +/// +/// - @ref Actions //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -272,13 +262,13 @@ namespace triagens { /// @brief generates first entry from a result set //////////////////////////////////////////////////////////////////////////////// - void generateResultSetNext (); + void generateDocument (TRI_doc_mptr_t const*, bool generateBody); //////////////////////////////////////////////////////////////////////////////// /// @brief splits a document reference into to parts //////////////////////////////////////////////////////////////////////////////// - vector splitDocumentReference (string const& name); + bool splitDocumentReference (string const& name, string& did); //////////////////////////////////////////////////////////////////////////////// /// @brief extracts the revision @@ -314,7 +304,7 @@ namespace triagens { /// @brief sets the rest set, needs the collection //////////////////////////////////////////////////////////////////////////////// - void findDocument (string const& doc); + TRI_doc_mptr_t const* findDocument (string const& doc); //////////////////////////////////////////////////////////////////////////////// /// @} @@ -350,10 +340,10 @@ namespace triagens { struct TRI_doc_collection_s* _documentCollection; //////////////////////////////////////////////////////////////////////////////// -/// @brief a result set +/// @brief a barrier for deletion //////////////////////////////////////////////////////////////////////////////// - struct TRI_result_set_s* _resultSet; + struct TRI_barrier_s* _barrier; //////////////////////////////////////////////////////////////////////////////// /// @brief timing data structure diff --git a/RestServer/AvocadoServer.cpp b/RestServer/AvocadoServer.cpp index 776df4cdb3..52144b0c7a 100644 --- a/RestServer/AvocadoServer.cpp +++ b/RestServer/AvocadoServer.cpp @@ -47,7 +47,7 @@ #include "Logger/Logger.h" #include "Rest/Initialise.h" #include "RestHandler/RestActionHandler.h" -#include "RestHandler/RestDocumentHandler.h" +#include "RestHandler/RestCollectionHandler.h" #include "RestHandler/RestSystemActionHandler.h" #include "RestServer/ActionDispatcherThread.h" #include "RestServer/AvocadoHttpServer.h" @@ -67,12 +67,12 @@ using namespace triagens::rest; using namespace triagens::admin; using namespace triagens::avocado; -#include "js/bootstrap/js-print.h" #include "js/bootstrap/js-modules.h" -#include "js/server/js-modules.h" +#include "js/bootstrap/js-print.h" #include "js/server/js-actions.h" #include "js/server/js-aql.h" #include "js/server/js-json.h" +#include "js/server/js-modules.h" #include "js/server/js-shell.h" // ----------------------------------------------------------------------------- @@ -387,31 +387,35 @@ void AvocadoServer::buildApplicationServer () { } if (_actionPath.empty()) { - string path = TRI_Concatenate2File(_databasePath.c_str(), "_ACTIONS"); + char* path = TRI_Concatenate2File(_databasePath.c_str(), "_ACTIONS"); + string pathString(path); + if (path) { + // memleak otherwise + TRI_Free(path); + } - if (! TRI_IsDirectory(path.c_str())) { - bool ok = TRI_ExistsFile(path.c_str()); + if (! TRI_IsDirectory(pathString.c_str())) { + bool ok = TRI_ExistsFile(pathString.c_str()); if (ok) { - LOGGER_FATAL << "action directory '" << path << "' must be a directory"; - cerr << "action directory '" << path << "' must be a directory\n"; + LOGGER_FATAL << "action directory '" << pathString << "' must be a directory"; + cerr << "action directory '" << pathString << "' must be a directory\n"; LOGGER_INFO << "please use the '--database.directory' option"; exit(EXIT_FAILURE); } - ok = TRI_CreateDirectory(path.c_str()); + ok = TRI_CreateDirectory(pathString.c_str()); if (! ok) { - LOGGER_FATAL << "cannot create action directory '" << path << "': " << TRI_last_error(); - cerr << "cannot create action directory '" << path << "': " << TRI_last_error() << "\n"; + LOGGER_FATAL << "cannot create action directory '" << pathString << "': " << TRI_last_error(); LOGGER_INFO << "please use the '--database.directory' option"; exit(EXIT_FAILURE); } } - ActionLoader.setDirectory(path); + ActionLoader.setDirectory(pathString); - LOGGER_INFO << "using database action files at '" << path << "'"; + LOGGER_INFO << "using database action files at '" << pathString << "'"; } else { ActionLoader.setDirectory(_actionPath); @@ -525,7 +529,7 @@ int AvocadoServer::startupServer () { _applicationAdminServer->addBasicHandlers(factory); - factory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator::createData, _vocbase); + factory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator::createData, _vocbase); factory->addPrefixHandler(RestVocbaseBaseHandler::ACTION_PATH, RestHandlerCreator::createData, _vocbase); _httpServer = _applicationHttpServer->buildServer(new AvocadoHttpServer(scheduler, dispatcher), factory, ports); @@ -544,7 +548,7 @@ int AvocadoServer::startupServer () { _applicationAdminServer->addBasicHandlers(adminFactory); _applicationAdminServer->addHandlers(adminFactory, "/admin"); - adminFactory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator::createData, _vocbase); + adminFactory->addPrefixHandler(RestVocbaseBaseHandler::DOCUMENT_PATH, RestHandlerCreator::createData, _vocbase); adminFactory->addPrefixHandler(RestVocbaseBaseHandler::ACTION_PATH, RestHandlerCreator::createData, _vocbase); adminFactory->addPrefixHandler(RestVocbaseBaseHandler::SYSTEM_ACTION_PATH, RestHandlerCreator::createData, _vocbase); @@ -681,6 +685,7 @@ void AvocadoServer::executeShell () { if (input == 0) { printf("bye...\n"); + TRI_FreeString(input); break; } @@ -699,6 +704,8 @@ void AvocadoServer::executeShell () { } console->close(); + delete console; + // and return from the context and isolate context->Exit(); isolate->Exit(); diff --git a/RestServer/AvocadoServer.h b/RestServer/AvocadoServer.h index c3854c1fb8..d00ca3e148 100644 --- a/RestServer/AvocadoServer.h +++ b/RestServer/AvocadoServer.h @@ -33,6 +33,7 @@ #include "Admin/ApplicationAdminServer.h" #include "HttpServer/ApplicationHttpServer.h" #include "VocBase/vocbase.h" +#include "VocBase/query-error.h" // ----------------------------------------------------------------------------- // --SECTION-- class AvocadoServer diff --git a/RestServer/avocado.cpp b/RestServer/avocado.cpp index 999460b292..4059c8af61 100644 --- a/RestServer/avocado.cpp +++ b/RestServer/avocado.cpp @@ -47,6 +47,20 @@ using namespace triagens::avocado; ///
      ///
    1. @ref StartStop ///
    2. +///
    3. AvocadoScript +///
        +///
      1. @ref SimpleQueries +///
      2. +///
      +///
    4. +///
    5. @ref AQL +///
        +///
      1. @ref Optimizer +///
      2. +///
      3. @ref IndexUsage +///
      4. +///
      +///
    6. ///
    7. @ref AvocadoScript ///
        ///
      1. @ref GeoCoordinates @@ -55,18 +69,22 @@ using namespace triagens::avocado; ///
      2. ///
      ///
    8. -///
    9. @ref HttpInterface -///
        -///
      1. @ref RestInterface -///
      2. -///
      3. @ref RestDocument -///
      4. -///
      -///
    10. ///
    11. Vertices, Edges, and Graphs ///
        ///
      1. @ref Graphs ///
      2. +///
      3. @ref JSModuleGraph +///
      4. +///
      +///
    12. +///
    +/// +///
  • Client Communication +///
      +///
    1. @ref HttpInterface +///
        +///
      1. @ref RestDocument +///
      2. ///
      ///
    2. ///
    @@ -183,11 +201,9 @@ using namespace triagens::avocado; /// @page InstallManual AvocadoDB Installation Manual /// ///
      -///
    1. Building the AvocadoDB from Scratch -///
        -///
      1. @ref Compiling -///
      2. -///
      +///
    2. @ref Installing +///
    3. +///
    4. @ref Compiling ///
    5. ///
    //////////////////////////////////////////////////////////////////////////////// @@ -335,6 +351,7 @@ using namespace triagens::avocado; int main (int argc, char* argv[]) { TRIAGENS_RESULT_GENERATOR_INITIALISE; TRI_InitialiseVocBase(); + TRI_InitialiseQueryErrors(); // create and start a AvocadoDB server AvocadoServer server(argc, argv); diff --git a/RestServer/install.h b/RestServer/install.h index 25c5116f14..1d4dd3b0d7 100644 --- a/RestServer/install.h +++ b/RestServer/install.h @@ -25,6 +25,43 @@ /// @author Copyright 2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @page InstallingTOC +/// +///
      +///
    1. @ref Installing +///
        +///
      1. @ref MacOSX +///
          +///
        1. @ref MacOSXHomebrew +///
        +///
      2. +///
      +///
    2. +///
    +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @page Installing Installing the AvocadoDB +/// +///
    +/// @copydoc CompilingTOC +///
    +/// +/// @section MacOSX +/////////////////// +/// +/// @subsection MacOSXHomebrew +////////////////////////////// +/// +/// If you are using homebrew, +/// than you can install the AvocadoDB using @CODE{brew} as follows: +/// +/// @LIT{brew install https://raw.github.com/triAGENS/homebrew/master/Library/Formula/avocadodb.rb} +/// +/// This will install the AvocadoDB within your Homebrew tree. +//////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// /// @page CompilingTOC /// @@ -61,7 +98,7 @@ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @page Compiling Compiling the AvocadoDB +/// @page Compiling Compiling the AvocadoDB from scratch /// /// The following sections describe how to compile and build the AvocadoDB from /// scratch. The AvocadoDB will compile on most Linux and Mac OS X systems. It diff --git a/Scheduler/SocketTask.h b/Scheduler/SocketTask.h index 3c65ae612b..9711cc57e4 100644 --- a/Scheduler/SocketTask.h +++ b/Scheduler/SocketTask.h @@ -36,7 +36,7 @@ namespace triagens { namespace basics { - class StringBuffer; + struct StringBuffer; } namespace rest { diff --git a/ShapedJson/shape-accessor.c b/ShapedJson/shape-accessor.c index cbbbe1baf0..d671b71b1a 100644 --- a/ShapedJson/shape-accessor.c +++ b/ShapedJson/shape-accessor.c @@ -220,6 +220,8 @@ static bool BytecodeShapeAccessor (TRI_shaper_t* shaper, TRI_shape_access_t* acc memcpy(cv.v, ops._buffer, ops._length * sizeof(void*)); + TRI_DestroyVectorPointer(&ops); + return true; } @@ -296,6 +298,18 @@ static bool ExecuteBytecodeShapeAccessor (TRI_shape_access_t const* accessor, /// @{ //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @brief free a shape accessor +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeShapeAccessor (TRI_shape_access_t* accessor) { + assert(accessor); + if (accessor->_code) { + TRI_Free((void*) accessor->_code); + } + TRI_Free(accessor); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief creates a shape accessor //////////////////////////////////////////////////////////////////////////////// @@ -307,15 +321,19 @@ TRI_shape_access_t* TRI_ShapeAccessor (TRI_shaper_t* shaper, bool ok; accessor = TRI_Allocate(sizeof(TRI_shape_access_t)); + if (!accessor) { + return NULL; + } accessor->_sid = sid; accessor->_pid = pid; + accessor->_code = NULL; ok = BytecodeShapeAccessor(shaper, accessor); if (ok) { return accessor; } - TRI_Free(accessor); + TRI_FreeShapeAccessor(accessor); return NULL; } diff --git a/ShapedJson/shape-accessor.h b/ShapedJson/shape-accessor.h index 544740ffdb..f2da656c0c 100644 --- a/ShapedJson/shape-accessor.h +++ b/ShapedJson/shape-accessor.h @@ -84,6 +84,12 @@ TRI_shape_ac_bc_e; /// @{ //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @brief free a shape accessor +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeShapeAccessor (TRI_shape_access_t*); + //////////////////////////////////////////////////////////////////////////////// /// @brief creates a shape accessor //////////////////////////////////////////////////////////////////////////////// diff --git a/ShapedJson/shaped-json.c b/ShapedJson/shaped-json.c index 6445502f2f..df948ccf4a 100644 --- a/ShapedJson/shaped-json.c +++ b/ShapedJson/shaped-json.c @@ -1816,6 +1816,9 @@ TRI_shaped_json_t* TRI_ShapedJsonJson (TRI_shaper_t* shaper, TRI_json_t const* j #endif shaped = TRI_Allocate(sizeof(TRI_shaped_json_t)); + if (!shaped) { + return NULL; + } shaped->_sid = dst._sid; shaped->_data.length = (uint32_t) dst._size; diff --git a/ShapedJson/shaped-json.h b/ShapedJson/shaped-json.h index b39317ed05..9e1aaeb696 100644 --- a/ShapedJson/shaped-json.h +++ b/ShapedJson/shaped-json.h @@ -50,9 +50,9 @@ extern "C" { /// - a list (aka array) /// - a object (aka associative array or hash or document) /// -/// In general JSON documents are schema-free. They can have any number of +/// In theory JSON documents are schema-free. They can have any number of /// attributes and an attribute value can be any JSON object. However, in -/// real life JSON documents often share a common shape. In order to take +/// practice JSON documents often share a common shape. In order to take /// advantage of this fact, JSON objects can be converted into /// @ref TRI_shaped_json_t instances together with a shape described by an /// @ref TRI_shape_t instance. diff --git a/SkipLists/skiplist.c b/SkipLists/skiplist.c new file mode 100755 index 0000000000..8151ed53e3 --- /dev/null +++ b/SkipLists/skiplist.c @@ -0,0 +1,1689 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief skiplist implementation +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. O +/// @author Copyright 2006-2012, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "skiplist.h" +#include + +#define SKIPLIST_ABSOLUTE_MAX_HEIGHT 100 +// ----------------------------------------------------------------------------- +// --SECTION-- ASSOCIATIVE ARRAY +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds a new element +//////////////////////////////////////////////////////////////////////////////// + +static void AddNewElement (TRI_skiplist_t* array, void* element) { +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief determines at what 'height' the item is to be added +//////////////////////////////////////////////////////////////////////////////// + +static int32_t RandLevel (TRI_skiplist_base_t* skiplist) { + + uint32_t level = 0; + int counter = 0; + uint32_t* ptr = skiplist->_random; + + + // ........................................................................... + // Obtain the random numbers and store them in the pre allocated storage + // ........................................................................... + for (int j = 0; j < skiplist->_numRandom; ++j) { + *ptr = TRI_UInt32Random(); + ++ptr; + } + ptr = skiplist->_random; + + + // ........................................................................... + // Use the bit list to determine the probability of the level. + // For 1/2: if bit (0) we stop, otherwise increase level. + // For 1/3: if bits (0,0) we stop, if bits (1,1) ignore and continue, otherwise increase level + // For 1/4: if bits (0,0) we stop, otherwise increase level + // ........................................................................... + switch (skiplist->_prob) { + + case TRI_SKIPLIST_PROB_HALF: { + counter = 0; + while (level < skiplist->_maxHeight) { + if ((1 & (*ptr)) == 0) { + break; + } + ++level; + (*ptr) = (*ptr) >> 1; + ++counter; + if (counter == 32) { + ++ptr; + counter = 0; + } + } + break; + } + + case TRI_SKIPLIST_PROB_THIRD: { + while (level < skiplist->_maxHeight) { + if ((3 & (*ptr)) == 0) { + break; + } + else if ((3 & (*ptr)) == 3) { + // do nothing do not increase level + } + else { + ++level; + } + (*ptr) = (*ptr) >> 2; + ++counter; + if (counter == 16) { + ++ptr; + counter = 0; + } + } + break; + } + + case TRI_SKIPLIST_PROB_QUARTER: { + counter = 0; + while (level < skiplist->_maxHeight) { + if ((3 & (*ptr)) == 0) { + break; + } + ++level; + (*ptr) = (*ptr) >> 2; + ++counter; + if (counter == 16) { + ++ptr; + counter = 0; + } + } + break; + } + + default: { + return -1; + } + } + return level; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Grow the node at the height specified. +//////////////////////////////////////////////////////////////////////////////// + +static void GrowNodeHeight(TRI_skiplist_node_t* node, uint32_t newHeight) { + + TRI_skiplist_nb_t* oldColumn = node->_column; + + if (node->_colLength >= newHeight) { + return; + } + + node->_column = TRI_Allocate(sizeof(TRI_skiplist_node_t) * newHeight); + memcpy(node->_column, oldColumn, node->_colLength * sizeof(TRI_skiplist_node_t) ); + + // ........................................................................... + // Initialise the storage + // ........................................................................... + + for (uint32_t j = node->_colLength; j < newHeight; ++j) { + (node->_column)[j]._prev = NULL; + (node->_column)[j]._next = NULL; + } + + TRI_Free(oldColumn); + node->_colLength = newHeight; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief joins a left node and right node together +//////////////////////////////////////////////////////////////////////////////// + +static void JoinNodes(TRI_skiplist_node_t* leftNode, TRI_skiplist_node_t* rightNode, + uint32_t startLevel, uint32_t endLevel) { + + + if (startLevel > endLevel) { // something wrong + return; + } + + if (leftNode->_colLength != rightNode->_colLength) { // something wrong + return; + } + + endLevel += 1; + + if (leftNode->_colLength < endLevel) { + return; + } + + for (uint32_t j = startLevel; j < endLevel; ++j) { + (leftNode->_column)[j]._next = rightNode; + (rightNode->_column)[j]._prev = leftNode; + } +} + + +static void TRI_DestroySkipListNode (TRI_skiplist_node_t* node) { + + if (node == NULL) { + return; + } + + TRI_Free(node->_column); +} + +static void TRI_FreeSkipListNode (TRI_skiplist_base_t* skiplist, TRI_skiplist_node_t* node) { + TRI_DestroySkipListNode(node); + if ( (node == &(skiplist->_startNode)) || + (node == &(skiplist->_endNode)) ) { + return; + } + TRI_Free(node); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialises an skip list +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitSkipList (TRI_skiplist_t* skiplist, + size_t elementSize, + int (*compareElementElement) (TRI_skiplist_t*, void*, void*), + int (*compareKeyElement) (TRI_skiplist_t*, void*, void*), + TRI_skiplist_prob_e probability, + uint32_t maximumHeight) { + + if (skiplist == NULL) { + return; + } + + // .......................................................................... + // Assign the comparision call back functions + // .......................................................................... + + skiplist->compareElementElement = compareElementElement; + skiplist->compareKeyElement = compareKeyElement; + + // .......................................................................... + // Assign the maximum height of the skip list. This maximum height must be + // no greater than the absolute max height defined as a compile time parameter + // .......................................................................... + skiplist->_base._maxHeight = maximumHeight; + if (maximumHeight > SKIPLIST_ABSOLUTE_MAX_HEIGHT) { + printf("%s:%d:Invalid maximum height for skiplist\n",__FILE__,__LINE__); + assert(false); + } + + // .......................................................................... + // Assign the probability and determine the number of random numbers which + // we will require -- do it once off here + // .......................................................................... + skiplist->_base._prob = probability; + skiplist->_base._numRandom = 0; + switch (skiplist->_base._prob) { + case TRI_SKIPLIST_PROB_HALF: { + // determine the number of random numbers which we require. + skiplist->_base._numRandom = (skiplist->_base._maxHeight / 32); + if ((skiplist->_base._maxHeight % 32) != 0) { + ++(skiplist->_base._numRandom); + } + break; + } + case TRI_SKIPLIST_PROB_THIRD: { + // determine the number of random numbers which we require. + skiplist->_base._numRandom = (skiplist->_base._maxHeight / 16); + if ((skiplist->_base._maxHeight % 16) != 0) { + ++(skiplist->_base._numRandom); + } + break; + } + case TRI_SKIPLIST_PROB_QUARTER: { + // determine the number of random numbers which we require. + skiplist->_base._numRandom = (skiplist->_base._maxHeight / 16); + if ((skiplist->_base._maxHeight % 16) != 0) { + ++(skiplist->_base._numRandom); + } + break; + } + default: { + assert(false); + // todo: log error + break; + } + } // end of switch statement + + // .......................................................................... + // Create storage for where to store the random numbers which we generated + // do it here once off. + // .......................................................................... + skiplist->_base._random = TRI_Allocate(sizeof(uint32_t) * skiplist->_base._numRandom); + + // .......................................................................... + // Assign the element size + // .......................................................................... + skiplist->_base._elementSize = elementSize; + + + // .......................................................................... + // Initialise the vertical storage of the lists and the place where we + // are going to store elements + // .......................................................................... + skiplist->_base._startNode._column = NULL; + skiplist->_base._startNode._colLength = 0; + skiplist->_base._startNode._extraData = NULL; + skiplist->_base._startNode._element = NULL; + + skiplist->_base._endNode._column = NULL; + skiplist->_base._endNode._colLength = 0; + skiplist->_base._endNode._extraData = NULL; + skiplist->_base._endNode._element = NULL; + + // .......................................................................... + // Whenever a probability of 1/2, 1/3, 1/4 is used, on average there will be + // each node will have a height of two. So initialise the start and end nodes + // with this 'average' height + // .......................................................................... + GrowNodeHeight(&(skiplist->_base._startNode), 2); + GrowNodeHeight(&(skiplist->_base._endNode), 2); + + // .......................................................................... + // Join the empty lists together + // [N]<----------------------------------->[N] + // [N]<----------------------------------->[N] + // .......................................................................... + JoinNodes(&(skiplist->_base._startNode),&(skiplist->_base._endNode),0,1); // list 0 & 1 +} + + +void TRI_InitSkipListMulti (TRI_skiplist_multi_t* skiplist, + size_t elementSize, + int (*compareElementElement) (TRI_skiplist_multi_t*, void*, void*), + int (*compareKeyElement) (TRI_skiplist_multi_t*, void*, void*), + TRI_skiplist_prob_e probability, + uint32_t maximumHeight) { + + if (skiplist == NULL) { + return; + } + + // .......................................................................... + // Assign the comparision call back functions + // .......................................................................... + + skiplist->compareElementElement = compareElementElement; + skiplist->compareKeyElement = compareKeyElement; + + // .......................................................................... + // Assign the maximum height of the skip list. This maximum height must be + // no greater than the absolute max height defined as a compile time parameter + // .......................................................................... + skiplist->_base._maxHeight = maximumHeight; + if (maximumHeight > SKIPLIST_ABSOLUTE_MAX_HEIGHT) { + printf("%s:%d:Invalid maximum height for skiplist\n",__FILE__,__LINE__); + assert(false); + } + + // .......................................................................... + // Assign the probability and determine the number of random numbers which + // we will require -- do it once off here + // .......................................................................... + skiplist->_base._prob = probability; + skiplist->_base._numRandom = 0; + switch (skiplist->_base._prob) { + case TRI_SKIPLIST_PROB_HALF: { + // determine the number of random numbers which we require. + skiplist->_base._numRandom = (skiplist->_base._maxHeight / 32); + if ((skiplist->_base._maxHeight % 32) != 0) { + ++(skiplist->_base._numRandom); + } + break; + } + case TRI_SKIPLIST_PROB_THIRD: { + // determine the number of random numbers which we require. + skiplist->_base._numRandom = (skiplist->_base._maxHeight / 16); + if ((skiplist->_base._maxHeight % 16) != 0) { + ++(skiplist->_base._numRandom); + } + break; + } + case TRI_SKIPLIST_PROB_QUARTER: { + // determine the number of random numbers which we require. + skiplist->_base._numRandom = (skiplist->_base._maxHeight / 16); + if ((skiplist->_base._maxHeight % 16) != 0) { + ++(skiplist->_base._numRandom); + } + break; + } + default: { + assert(false); + // todo: log error + break; + } + } // end of switch statement + + // .......................................................................... + // Create storage for where to store the random numbers which we generated + // do it here once off. + // .......................................................................... + skiplist->_base._random = TRI_Allocate(sizeof(uint32_t) * skiplist->_base._numRandom); + + // .......................................................................... + // Assign the element size + // .......................................................................... + skiplist->_base._elementSize = elementSize; + + + // .......................................................................... + // Initialise the vertical storage of the lists and the place where we + // are going to store elements + // .......................................................................... + skiplist->_base._startNode._column = NULL; + skiplist->_base._startNode._colLength = 0; + skiplist->_base._startNode._extraData = NULL; + skiplist->_base._startNode._element = NULL; + + skiplist->_base._endNode._column = NULL; + skiplist->_base._endNode._colLength = 0; + skiplist->_base._endNode._extraData = NULL; + skiplist->_base._endNode._element = NULL; + + // .......................................................................... + // Whenever a probability of 1/2, 1/3, 1/4 is used, on average + // each node will have a height of two. So initialise the start and end nodes + // with this 'average' height + // .......................................................................... + GrowNodeHeight(&(skiplist->_base._startNode), 2); + GrowNodeHeight(&(skiplist->_base._endNode), 2); + + // .......................................................................... + // Join the empty lists together + // [N]<----------------------------------->[N] + // [N]<----------------------------------->[N] + // .......................................................................... + JoinNodes(&(skiplist->_base._startNode),&(skiplist->_base._endNode),0,1); // list 0 & 1 +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys a skip list, but does not free the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_DestroySkipList (TRI_skiplist_t* skiplist) { + TRI_skiplist_node_t* nextNode; + TRI_skiplist_node_t* oldNextNode; + + if (skiplist == NULL) { + return; + } + + nextNode = &(skiplist->_base._startNode); + while (nextNode != NULL) { + oldNextNode = nextNode->_column[0]._next; + TRI_Free(nextNode->_column); + if ((nextNode != &(skiplist->_base._startNode)) && (nextNode != &(skiplist->_base._endNode))) { + TRI_Free(nextNode); + } + nextNode = oldNextNode; + } + TRI_Free(skiplist->_base._random); +} + + +void TRI_DestroySkipListMulti (TRI_skiplist_multi_t* skiplist) { + TRI_skiplist_node_t* nextNode; + TRI_skiplist_node_t* oldNextNode; + + if (skiplist == NULL) { + return; + } + + nextNode = &(skiplist->_base._startNode); + while (nextNode != NULL) { + oldNextNode = nextNode->_column[0]._next; + TRI_Free(nextNode->_column); + if ((nextNode != &(skiplist->_base._startNode)) && (nextNode != &(skiplist->_base._endNode))) { + TRI_Free(nextNode); + } + nextNode = oldNextNode; + } + TRI_Free(skiplist->_base._random); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys a skip list and frees the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeSkipList (TRI_skiplist_t* skiplist) { + TRI_DestroySkipList(skiplist); + TRI_Free(skiplist); +} + +void TRI_FreeSkipListMulti (TRI_skiplist_multi_t* skiplist) { + TRI_DestroySkipListMulti(skiplist); + TRI_Free(skiplist); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given a key +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_LookupByKeySkipList (TRI_skiplist_t* skiplist, void* key) { + return NULL; +} + +TRI_vector_pointer_t TRI_LookupByKeySkipListMulti (TRI_skiplist_multi_t* skiplist, void* key) { + + TRI_vector_pointer_t result; + int32_t level; + int32_t currentLevel; + TRI_skiplist_node_t* currentNode; + TRI_skiplist_node_t* nextNode; + int compareResult; + + TRI_InitVectorPointer(&result); + + // ........................................................................... + // Just in case + // ........................................................................... + + if (skiplist == NULL) { + return result; + } + + + // ........................................................................... + // Determine the starting level and the starting node + // ........................................................................... + + currentLevel = skiplist->_base._startNode._colLength - 1; + currentNode = &(skiplist->_base._startNode); + + //printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%u\n",__FILE__,__LINE__,currentLevel); + + START: + + + // ......................................................................... + // Find the next node in the current level of the lists. + // ......................................................................... + nextNode = (TRI_skiplist_node_t*)(currentNode->_column[currentLevel]._next); + + + + // ......................................................................... + // WE HAVE FOUR CASES TO CONSIDER + // ......................................................................... + + // ......................................................................... + // CASE ONE: + // At this level we have the smallest (start) and largest (end) nodes ONLY. + // CASE TWO: + // We have arrived at the end of the nodes and we are not at the + // start of the nodes either. + // ......................................................................... + + if (nextNode == &(skiplist->_base._endNode)) { + + // ....................................................................... + // We are at the lowest level of the lists, and we haven't found the item + // yet. Eventually we would like to return iterators. + // ....................................................................... + if (currentLevel == 0) { + return result; + } + + // ....................................................................... + // We have not yet reached the lowest level continue down. + // ....................................................................... + --currentLevel; + + goto START; + } + + + + // ......................................................................... + // CASE THREE: + // We are the smallest left most node and the NEXT node is NOT the end node. + // Compare this element with the element in the right node to see what we do. + // CASE FOUR: + // We are somewhere in the middle of a list, away from the smallest and + // largest nodes. + // ......................................................................... + + else { // nextNode != &(skiplist->_endNode) + // ....................................................................... + // Use the callback to determine if the element is less or greater than + // the next node element. + // ....................................................................... + compareResult = skiplist->compareKeyElement(skiplist,key,&(nextNode->_element)); + + // ....................................................................... + // We have found the item! Treat it like a bigger item + // ....................................................................... + if (compareResult == 0) { + //printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%u\n",__FILE__,__LINE__,currentLevel); + } + + // ....................................................................... + // The element is greater than the next node element. Keep going on this + // level. + // ....................................................................... + if (compareResult > 0) { + currentNode = nextNode; + goto START; + } + + + // ....................................................................... + // We have reached the lowest level of the lists -- no such item. + // ....................................................................... + if (currentLevel == 0 && compareResult != 0) { + //printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%u\n",__FILE__,__LINE__,currentLevel); + return result; + } + + if (currentLevel == 0 && compareResult == 0) { + //printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%u\n",__FILE__,__LINE__,currentLevel); + currentNode = nextNode; + goto END; + } + + // ....................................................................... + // Drop down the list + // ....................................................................... + --currentLevel; + + goto START; + } + + + + END: + + compareResult = skiplist->compareKeyElement(skiplist,key,&(currentNode->_element)); + //printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%u:%u\n",__FILE__,__LINE__,currentNode->_colLength,compareResult); + + while (true) { + TRI_PushBackVectorPointer(&result, &(currentNode->_element)); + nextNode = (TRI_skiplist_node_t*)(currentNode->_column[0]._next); + compareResult = skiplist->compareKeyElement(skiplist,key,&(nextNode->_element)); + if (compareResult != 0) { + break; + } + else { + currentNode = nextNode; + } + } + + //printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%u:%u:%u\n",__FILE__,__LINE__,currentNode->_colLength,compareResult,result._length); + + return result; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds an element given a key, return NULL if not found +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_FindByKeySkipList (TRI_skiplist_t* skiplist, void* key) { + return NULL; +} + +TRI_vector_pointer_t TRI_FindByKeySkipListMulti (TRI_skiplist_multi_t* skiplist, void* key) { + assert(false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given an element +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_LookupByElementSkipList (TRI_skiplist_t* skiplist, void* element) { + + int32_t level; + int32_t currentLevel; + TRI_skiplist_node_t* currentNode; + TRI_skiplist_node_t* nextNode; + int compareResult; + + // ........................................................................... + // Just in case + // ........................................................................... + + if (skiplist == NULL) { + return false; + } + + + // ........................................................................... + // Determine the starting level and the starting node + // ........................................................................... + + currentLevel = skiplist->_base._startNode._colLength - 1; + currentNode = &(skiplist->_base._startNode); + + + START: + + + // ......................................................................... + // Find the next node in the current level of the lists. + // ......................................................................... + nextNode = (TRI_skiplist_node_t*)(currentNode->_column[currentLevel]._next); + + + + // ......................................................................... + // WE HAVE FOUR CASES TO CONSIDER + // ......................................................................... + + // ......................................................................... + // CASE ONE: + // At this level we have the smallest (start) and largest (end) nodes ONLY. + // CASE TWO: + // We have arrived at the end of the nodes and we are not at the + // start of the nodes either. + // ......................................................................... + + if (nextNode == &(skiplist->_base._endNode)) { + + //printf("%s:%u:%u\n",__FILE__,__LINE__,currentLevel); + + // ....................................................................... + // We are at the lowest level of the lists, and we haven't found the item + // yet. Eventually we would like to return iterators. + // ....................................................................... + if (currentLevel == 0) { + return NULL; + } + + // ....................................................................... + // We have not yet reached the lowest level continue down. + // ....................................................................... + --currentLevel; + + goto START; + } + + + + // ......................................................................... + // CASE THREE: + // We are the smallest left most node and the NEXT node is NOT the end node. + // Compare this element with the element in the right node to see what we do. + // CASE FOUR: + // We are somewhere in the middle of a list, away from the smallest and + // largest nodes. + // ......................................................................... + + else { // nextNode != &(skiplist->_endNode + // ....................................................................... + // Use the callback to determine if the element is less or greater than + // the next node element. + // ....................................................................... + compareResult = skiplist->compareElementElement(skiplist,element,&(nextNode->_element)); + + //printf("%s:%u:%u:%u\n",__FILE__,__LINE__,currentLevel,compareResult); + + // ....................................................................... + // We have found the item! + // ....................................................................... + if (compareResult == 0) { + return &(nextNode->_element); + } + + // ....................................................................... + // The element is greater than the next node element. Keep going on this + // level. + // ....................................................................... + if (compareResult > 0) { + currentNode = nextNode; + goto START; + } + + + // ....................................................................... + // We have reached the lowest level of the lists -- no such item. + // ....................................................................... + if (currentLevel == 0) { + return NULL; + } + + // ....................................................................... + // Drop down the list + // ....................................................................... + --currentLevel; + + goto START; + } + + + + END: + + assert(false); // there is no way we can be here + return NULL; +} + + +TRI_vector_pointer_t TRI_LookupByElementSkipListMulti (TRI_skiplist_multi_t* skiplist, void* element) { + assert(false); +} +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds an element given an element, returns NULL if not found +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_FindByElementSkipList (TRI_skiplist_t* skiplist, void* element) { + return NULL; +} + +TRI_vector_pointer_t TRI_FindByElementSkipListMulti (TRI_skiplist_multi_t* skiplist, void* element) { + assert(false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an element to the skip list +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertElementSkipList (TRI_skiplist_t* skiplist, void* element, bool overwrite) { + + // ........................................................................... + // TODO: remove the need for the path variable below. First create the element + // node and then fill the column with the appropriate nodes. + // ........................................................................... + + // ........................................................................... + // storage for the path which is traced while we attempt to find a position + // for the item to be inserted. + // ........................................................................... + typedef struct { + TRI_skiplist_node_t* _node; + int32_t _level; + } ExtendedNode; + ExtendedNode path[SKIPLIST_ABSOLUTE_MAX_HEIGHT]; + + int32_t newHeight; + int32_t currentLevel; + uint32_t oldColLength; + TRI_skiplist_node_t* currentNode; + TRI_skiplist_node_t* nextNode; + TRI_skiplist_node_t* newNode; + TRI_skiplist_node_t* tempLeftNode; + TRI_skiplist_node_t* tempRightNode; + int compareResult; + + // ........................................................................... + // Just in case + // ........................................................................... + + if (skiplist == NULL) { + return false; + } + + + // ........................................................................... + // Determine the number of levels in which to add the item. That is, determine + // the height of the node so that it participates in that many lists. + // ........................................................................... + + newHeight = RandLevel(&(skiplist->_base)); + + // ........................................................................... + // Something wrong since the newHeight must be non-negative + // ........................................................................... + + if (newHeight < 0) { + return false; + } + + // ........................................................................... + // convert the level to a height + // ........................................................................... + newHeight += 1; + + /* + printf("%s:%u:%u\n",__FILE__,__LINE__,newHeight); + currentNode = &(skiplist->_base._startNode); + for (int j = currentNode->_colLength - 1; j > -1; --j) { + printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%d:%u:%u:%u:%u:%u\n",__FILE__,__LINE__, + j, + currentNode->_colLength, + (uint64_t)((TRI_skiplist_node_t*)(currentNode->_column[j]._prev)), + (uint64_t)(&(skiplist->_base._startNode)), + (uint64_t)((TRI_skiplist_node_t*)(currentNode->_column[j]._next)), + (uint64_t)(&(skiplist->_base._endNode)) + ); + } + */ + + // ........................................................................... + // Grow lists if required by increasing the height of the start and end nodes + // ........................................................................... + oldColLength = skiplist->_base._startNode._colLength; + if ((uint32_t)(newHeight) > oldColLength) { + GrowNodeHeight(&(skiplist->_base._startNode), newHeight); + GrowNodeHeight(&(skiplist->_base._endNode), newHeight); + JoinNodes(&(skiplist->_base._startNode),&(skiplist->_base._endNode), oldColLength , newHeight - 1); + } + + /* + // start oreste + printf("%s:%u:%u\n",__FILE__,__LINE__,newHeight); + currentNode = &(skiplist->_base._startNode); + for (int j = currentNode->_colLength - 1; j > -1; --j) { + printf("%s:%d:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:%d:%u:%u:%u:%u:%u\n",__FILE__,__LINE__, + j, + currentNode->_colLength, + (uint64_t)((TRI_skiplist_node_t*)(currentNode->_column[j]._prev)), + (uint64_t)(&(skiplist->_base._startNode)), + (uint64_t)((TRI_skiplist_node_t*)(currentNode->_column[j]._next)), + (uint64_t)(&(skiplist->_base._endNode)) + ); + } + // end oreste + */ + + // ........................................................................... + // Determine the path where the new item is to be inserted. If the item + // already exists either replace it or return false. Recall that this + // skip list is used for unique key/value pairs. Use the skiplist-multi + // non-unique key/value pairs. + // ........................................................................... + currentLevel = skiplist->_base._startNode._colLength - 1; // NOT current height BUT current level + currentNode = &(skiplist->_base._startNode); + + + START: + + + // ......................................................................... + // Find the next node in the current level of the lists. + // ......................................................................... + nextNode = (TRI_skiplist_node_t*)(currentNode->_column[currentLevel]._next); + + + // ......................................................................... + // WE HAVE FOUR CASES TO CONSIDER + // ......................................................................... + + // ......................................................................... + // CASE ONE: + // At this level we have the smallest (start) and largest (end) nodes ONLY. + // CASE TWO: + // We have arrived at the end of the nodes and we are not at the + // start of the nodes either. + // ......................................................................... + + if (nextNode == &(skiplist->_base._endNode)) { + + + // ....................................................................... + // Store the current node and level in the path + // ....................................................................... + path[currentLevel]._node = currentNode; + + // printf("%s:%u:%u:%u\n",__FILE__,__LINE__,newHeight,currentLevel); + + // ....................................................................... + // We are at the lowest level of the lists, insert the item to the + // right of the current node + // ....................................................................... + if (currentLevel == 0) { + goto END; + } + + // ....................................................................... + // We have not yet reached the lowest level continue down. + // ....................................................................... + --currentLevel; + + goto START; + } + + + + // ......................................................................... + // CASE THREE: + // We are the smallest left most node and the NEXT node is NOT the end node. + // Compare this element with the element in the right node to see what we do. + // CASE FOUR: + // We are somewhere in the middle of a list, away from the smallest and + // largest nodes. + // ......................................................................... + + else { // nextNode != &(skiplist->_endNode + + // ....................................................................... + // Use the callback to determine if the element is less or greater than + // the next node element. + // ....................................................................... + compareResult = skiplist->compareElementElement(skiplist,element,&(nextNode->_element)); + + //printf("%s:%u:%u:%u:%u\n",__FILE__,__LINE__,newHeight,currentLevel,compareResult); + + // ....................................................................... + // The element matches the next element. Overwrite if possible and return. + // We do not allow non-unique elements. + // ....................................................................... + if (compareResult == 0) { + printf("%s:%u:should not happen\n",__FILE__,__LINE__); + if (overwrite) { + memcpy(&(nextNode->_element),element,skiplist->_base._elementSize); + return true; + } + return false; + } + + // ....................................................................... + // The element is greater than the next node element. Keep going on this + // level. + // ....................................................................... + if (compareResult > 0) { + currentNode = nextNode; + goto START; + } + + + // ....................................................................... + // The element is less than the next node. Can we drop down the list? + // Store the current node and level in the path. + // ....................................................................... + path[currentLevel]._node = currentNode; + + // ....................................................................... + // We have reached the lowest level of the lists. Time to insert item. + // ....................................................................... + if (currentLevel == 0) { + goto END; + } + + // ....................................................................... + // Drop down the list + // ....................................................................... + --currentLevel; + + goto START; + } + + + + END: + + // .......................................................................... + // Ok finished with the loop and we should have a path with AT MOST + // SKIPLIST_ABSOLUTE_MAX_HEIGHT number of elements. + // .......................................................................... + + // ............................................................................ + // Create memory for the new node to be inserted + // ............................................................................ + + newNode = TRI_Allocate(sizeof(TRI_skiplist_node_t) + skiplist->_base._elementSize); + if (newNode == NULL) { // out of memory? + return false; + } + + newNode->_extraData = NULL; + newNode->_colLength = 0; + memcpy(&(newNode->_element),element,skiplist->_base._elementSize); + + GrowNodeHeight(newNode, newHeight); + + for (int j = 0; j < newHeight; ++j) { + tempLeftNode = path[j]._node; + tempRightNode = tempLeftNode->_column[j]._next; + JoinNodes(tempLeftNode, newNode, j, j); + JoinNodes(newNode, tempRightNode, j, j); + } + + return true; +} + + +bool TRI_InsertElementSkipListMulti (TRI_skiplist_multi_t* skiplist, void* element, bool overwrite) { + + int32_t newHeight; + int32_t currentLevel; + int pathPosition; + uint32_t oldColLength; + TRI_skiplist_node_t* currentNode; + TRI_skiplist_node_t* nextNode; + TRI_skiplist_node_t* newNode; + TRI_skiplist_node_t* tempLeftNode; + TRI_skiplist_node_t* tempRightNode; + int compareResult; + + // ........................................................................... + // Just in case + // ........................................................................... + + if (skiplist == NULL) { + return false; + } + + + // ........................................................................... + // Determine the number of levels in which to add the item. That is, determine + // the height of the node so that it participates in that many lists. + // ........................................................................... + + newHeight = RandLevel(&(skiplist->_base)); + + // ........................................................................... + // Something wrong since the newHeight must be non-negative + // ........................................................................... + + if (newHeight < 0) { + return false; + } + + // ........................................................................... + // Convert level to height + // ........................................................................... + newHeight += 1; + + // ........................................................................... + // Grow lists if required by increasing the height of the start and end nodes + // ........................................................................... + oldColLength = skiplist->_base._startNode._colLength; + if ((uint32_t)(newHeight) > oldColLength) { + + GrowNodeHeight(&(skiplist->_base._startNode), newHeight); + GrowNodeHeight(&(skiplist->_base._endNode), newHeight); + JoinNodes(&(skiplist->_base._startNode),&(skiplist->_base._endNode), oldColLength, newHeight - 1); + } + + + // ........................................................................... + // Create the new node to be inserted. If there is some sort of failure, + // then we delete the node memory. + // ........................................................................... + newNode = TRI_Allocate(sizeof(TRI_skiplist_node_t) + skiplist->_base._elementSize); + if (newNode == NULL) { // out of memory? + return false; + } + + newNode->_extraData = NULL; + newNode->_colLength = 0; + memcpy(&(newNode->_element),element,skiplist->_base._elementSize); + GrowNodeHeight(newNode, newHeight); + + // ........................................................................... + // Recall that this + // skip list is used for unique key/value pairs. Use the skiplist-multi + // non-unique key/value pairs. + // ........................................................................... + currentLevel = skiplist->_base._startNode._colLength - 1; // NOT current height BUT current level + currentNode = &(skiplist->_base._startNode); + + + START: + + + // ......................................................................... + // Find the next node in the current level of the lists. + // ......................................................................... + nextNode = (TRI_skiplist_node_t*)(currentNode->_column[currentLevel]._next); + + + // ......................................................................... + // WE HAVE FOUR CASES TO CONSIDER + // ......................................................................... + + // ......................................................................... + // CASE ONE: + // At this level we have the smallest (start) and largest (end) nodes ONLY. + // CASE TWO: + // We have arrived at the end of the nodes and we are not at the + // start of the nodes either. + // ......................................................................... + + if (nextNode == &(skiplist->_base._endNode)) { + + + // ....................................................................... + // Store the current node in the current level + // ....................................................................... + if (currentLevel < newHeight) { + newNode->_column[currentLevel]._prev = currentNode; + } + + // ....................................................................... + // We are at the lowest level of the lists, insert the item to the + // right of the current node + // ....................................................................... + if (currentLevel == 0) { + goto END; + } + + // ....................................................................... + // We have not yet reached the lowest level continue down. + // ....................................................................... + --currentLevel; + + goto START; + } + + + + // ......................................................................... + // CASE THREE: + // We are the smallest left most node and the NEXT node is NOT the end node. + // Compare this element with the element in the right node to see what we do. + // CASE FOUR: + // We are somewhere in the middle of a list, away from the smallest and + // largest nodes. + // ......................................................................... + + else { // nextNode != &(skiplist->_endNode) + + // ....................................................................... + // Use the callback to determine if the element is less or greater than + // the next node element. + // ....................................................................... + compareResult = skiplist->compareElementElement(skiplist,element,&(nextNode->_element)); + + // ....................................................................... + // The element is the same + // ....................................................................... + if (compareResult == 0) { + printf("%s:%u:should not happen\n",__FILE__,__LINE__); + if (overwrite) { + memcpy(&(nextNode->_element),element,skiplist->_base._elementSize); + TRI_FreeSkipListNode(&(skiplist->_base), newNode); + return true; + } + TRI_FreeSkipListNode(&(skiplist->_base), newNode); + return false; + } + + // ....................................................................... + // The element is greater than the next node element. Keep going on this + // level. + // ....................................................................... + if (compareResult > 0) { + currentNode = nextNode; + goto START; + } + + + // ....................................................................... + // The element is less than the next node. Can we drop down the list? + // Store the current node and level in the path. + // ....................................................................... + if (currentLevel < newHeight) { + newNode->_column[currentLevel]._prev = currentNode; + } + + // ....................................................................... + // We have reached the lowest level of the lists. Time to insert item. + // ....................................................................... + if (currentLevel == 0) { + goto END; + } + + // ....................................................................... + // Drop down the list + // ....................................................................... + --currentLevel; + + goto START; + } + + + + END: + + for (int j = 0; j < newHeight; ++j) { + tempLeftNode = newNode->_column[j]._prev; + tempRightNode = tempLeftNode->_column[j]._next; + JoinNodes(tempLeftNode, newNode, j, j); + JoinNodes(newNode, tempRightNode, j, j); + } + + return true; +} +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an key/element to the skip list +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertKeySkipList (TRI_skiplist_t* skiplist, void* key, void* element, bool overwrite) { + return false; +} + +bool TRI_InsertKeySkipListMulti (TRI_skiplist_multi_t* skiplist, void* key, void* element, bool overwrite) { + + int32_t newHeight; + int32_t currentLevel; + int pathPosition; + uint32_t oldColLength; + TRI_skiplist_node_t* currentNode; + TRI_skiplist_node_t* nextNode; + TRI_skiplist_node_t* newNode; + TRI_skiplist_node_t* tempLeftNode; + TRI_skiplist_node_t* tempRightNode; + int compareResult; + + // ........................................................................... + // Just in case + // ........................................................................... + + if (skiplist == NULL) { + return false; + } + + + // ........................................................................... + // Determine the number of levels in which to add the item. That is, determine + // the height of the node so that it participates in that many lists. + // ........................................................................... + + newHeight = RandLevel(&(skiplist->_base)); + + // ........................................................................... + // Something wrong since the newHeight must be non-negative + // ........................................................................... + + if (newHeight < 0) { + return false; + } + + + // ........................................................................... + // Convert level to height + // ........................................................................... + newHeight += 1; + + // ........................................................................... + // Grow lists if required by increasing the height of the start and end nodes + // ........................................................................... + oldColLength = skiplist->_base._startNode._colLength; + if ((uint32_t)(newHeight) > oldColLength) { + GrowNodeHeight(&(skiplist->_base._startNode), newHeight); + GrowNodeHeight(&(skiplist->_base._endNode), newHeight); + JoinNodes(&(skiplist->_base._startNode),&(skiplist->_base._endNode), oldColLength, newHeight - 1); + } + + + // ........................................................................... + // Create the new node to be inserted. If there is some sort of failure, + // then we delete the node memory. + // ........................................................................... + newNode = TRI_Allocate(sizeof(TRI_skiplist_node_t) + skiplist->_base._elementSize); + if (newNode == NULL) { // out of memory? + return false; + } + + newNode->_extraData = NULL; + newNode->_colLength = 0; + memcpy(&(newNode->_element),element,skiplist->_base._elementSize); + GrowNodeHeight(newNode, newHeight); + + // ........................................................................... + // Recall that this + // skip list is used for unique key/value pairs. Use the skiplist-multi + // non-unique key/value pairs. + // ........................................................................... + currentLevel = skiplist->_base._startNode._colLength - 1; // NOT current height BUT current level + currentNode = &(skiplist->_base._startNode); + + + START: + + + // ......................................................................... + // Find the next node in the current level of the lists. + // ......................................................................... + nextNode = (TRI_skiplist_node_t*)(currentNode->_column[currentLevel]._next); + + + // ......................................................................... + // WE HAVE FOUR CASES TO CONSIDER + // ......................................................................... + + // ......................................................................... + // CASE ONE: + // At this level we have the smallest (start) and largest (end) nodes ONLY. + // CASE TWO: + // We have arrived at the end of the nodes and we are not at the + // start of the nodes either. + // ......................................................................... + + if (nextNode == &(skiplist->_base._endNode)) { + + + //printf("%s:%d:###################################:%d\n",__FILE__,__LINE__,newHeight); + // ....................................................................... + // Store the current node in the current level + // ....................................................................... + if (currentLevel < newHeight) { + newNode->_column[currentLevel]._prev = currentNode; + } + + // ....................................................................... + // We are at the lowest level of the lists, insert the item to the + // right of the current node + // ....................................................................... + if (currentLevel == 0) { + goto END; + } + + // ....................................................................... + // We have not yet reached the lowest level continue down. + // ....................................................................... + --currentLevel; + + goto START; + } + + + + // ......................................................................... + // CASE THREE: + // We are the smallest left most node and the NEXT node is NOT the end node. + // Compare this element with the element in the right node to see what we do. + // CASE FOUR: + // We are somewhere in the middle of a list, away from the smallest and + // largest nodes. + // ......................................................................... + + else { // nextNode != &(skiplist->_endNode) + + //printf("%s:%d:**********************************:%d:%d\n",__FILE__,__LINE__,newHeight,currentLevel); + // ....................................................................... + // Use the callback to determine if the element is less or greater than + // the next node element. + // ....................................................................... + compareResult = skiplist->compareKeyElement(skiplist,element,&(nextNode->_element)); + + // ....................................................................... + // The keys match element we just assume that the element to insert + // is smaller. We should ensure that the elements are not the same + // ....................................................................... + if (compareResult == 0) { + } + + // ....................................................................... + // The element is greater than the next node element. Keep going on this + // level. + // ....................................................................... + if (compareResult > 0) { + currentNode = nextNode; + goto START; + } + + + // ....................................................................... + // The element is less than the next node. Can we drop down the list? + // Store the current node and level in the path. + // ....................................................................... + if (currentLevel < newHeight) { + newNode->_column[currentLevel]._prev = currentNode; + } + + // ....................................................................... + // We have reached the lowest level of the lists. Time to insert item. + // ....................................................................... + if (currentLevel == 0) { + goto END; + } + + // ....................................................................... + // Drop down the list + // ....................................................................... + --currentLevel; + + goto START; + } + + + + END: + + for (int j = 0; j < newHeight; ++j) { + tempLeftNode = newNode->_column[j]._prev; + tempRightNode = tempLeftNode->_column[j]._next; + JoinNodes(tempLeftNode, newNode, j, j); + JoinNodes(newNode, tempRightNode, j, j); + } + + return true; +} + + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an element from the skip list. +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveElementSkipList (TRI_skiplist_t* skiplist, void* element, void* old) { + int32_t currentLevel; + TRI_skiplist_node_t* currentNode; + TRI_skiplist_node_t* nextNode; + TRI_skiplist_node_t* tempLeftNode; + TRI_skiplist_node_t* tempRightNode; + int compareResult; + + // ........................................................................... + // Just in case + // ........................................................................... + + if (skiplist == NULL) { + return false; + } + + + // ........................................................................... + // Start at the top most list and left most position of that list. + // ........................................................................... + currentLevel = skiplist->_base._startNode._colLength - 1; // current level not height + currentNode = &(skiplist->_base._startNode); + + START: + + + // ......................................................................... + // Find the next node in the current level of the lists. + // ......................................................................... + nextNode = (TRI_skiplist_node_t*)(currentNode->_column[currentLevel]._next); + + + // ......................................................................... + // WE HAVE FOUR CASES TO CONSIDER + // ......................................................................... + + // ......................................................................... + // CASE ONE: + // At this level we have the smallest (start) and largest (end) nodes ONLY. + // CASE TWO: + // We have arrived at the end of the nodes and we are not at the + // start of the nodes either. + // ......................................................................... + + if (nextNode == &(skiplist->_base._endNode)) { + + // ....................................................................... + // We are at the lowest level of the lists, and we haven't found the item + // yet. Nothing to remove so return. + // ....................................................................... + if (currentLevel == 0) { + return false; + } + + // ....................................................................... + // We have not yet reached the lowest level continue down. + // ....................................................................... + --currentLevel; + + goto START; + } + + + + // ......................................................................... + // CASE THREE: + // We are the smallest left most node and the NEXT node is NOT the end node. + // Compare this element with the element in the right node to see what we do. + // CASE FOUR: + // We are somewhere in the middle of a list, away from the smallest and + // largest nodes. + // ......................................................................... + + else { // nextNode != &(skiplist->_endNode + + // ....................................................................... + // Use the callback to determine if the element is less or greater than + // the next node element. + // ....................................................................... + compareResult = skiplist->compareElementElement(skiplist,element,&(nextNode->_element)); + + // ....................................................................... + // We have found the item! + // ....................................................................... + if (compareResult == 0) { + currentNode = nextNode; + goto END; + } + + // ....................................................................... + // The element is greater than the next node element. Keep going on this + // level. + // ....................................................................... + if (compareResult > 0) { + currentNode = nextNode; + goto START; + } + + + // ....................................................................... + // We have reached the lowest level of the lists -- no such item. + // ....................................................................... + if (currentLevel == 0) { + return false; + } + + // ....................................................................... + // Drop down the list + // ....................................................................... + --currentLevel; + + goto START; + } + + + + END: + + + // .......................................................................... + // If requested copy the contents of the element we have located into the + // storage sent. + // .......................................................................... + + if (old != NULL) { + memcpy(old, &(currentNode->_element), skiplist->_base._elementSize); + } + + + // .......................................................................... + // Attempt to remove element + // .......................................................................... + + + for (unsigned int j = 0; j < currentNode->_colLength; ++j) { + tempLeftNode = currentNode->_column[j]._prev; + tempRightNode = currentNode->_column[j]._next; + JoinNodes(tempLeftNode, tempRightNode, j, j); + } + + TRI_Free(currentNode->_column); + TRI_Free(currentNode); + + return true; + +} + +bool TRI_RemoveElementSkipListMulti (TRI_skiplist_multi_t* skiplist, void* element, void* old) { + assert(false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an key/element to the skip list +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveKeySkipList (TRI_skiplist_t* skiplist, void* key, void* old) { + return false; +} + +bool TRI_RemoveKeySkipListMulti (TRI_skiplist_multi_t* skiplist, void* key, void* old) { + assert(false); +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/SkipLists/skiplist.h b/SkipLists/skiplist.h new file mode 100755 index 0000000000..3e8086b3de --- /dev/null +++ b/SkipLists/skiplist.h @@ -0,0 +1,310 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief skip list implementation +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2004-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. O +/// @author Copyright 2006-2012, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + + +#ifndef TRIAGENS_BASICS_C_SKIPLIST_H +#define TRIAGENS_BASICS_C_SKIPLIST_H 1 + +#include "BasicsC/common.h" +#include "BasicsC/locks.h" +#include "BasicsC/vector.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// ----------------------------------------------------------------------------- +// --SECTION-- public types +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief skip list +//////////////////////////////////////////////////////////////////////////////// + +typedef enum { + TRI_SKIPLIST_PROB_HALF, + TRI_SKIPLIST_PROB_THIRD, + TRI_SKIPLIST_PROB_QUARTER +} +TRI_skiplist_prob_e; + +typedef struct TRI_skiplist_nb_s { + void* _prev; + void* _next; +} +TRI_skiplist_nb_t; // nearest neighbour; + +typedef struct TRI_skiplist_node_s { + TRI_skiplist_nb_t* _column; // these represent the levels + uint32_t _colLength; + void* _extraData; + void* _element; +} +TRI_skiplist_node_t; + + +//////////////////////////////////////////////////////////////////////////////// +// The base structure of a skiplist +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_skiplist_base_s { + // ........................................................................... + // The maximum height of this skip list. Thus 2^(_maxHeight) elements can be + // stored in the skip list. + // ........................................................................... + uint32_t _maxHeight; + + // ........................................................................... + // The size of each element which is to be stored. + // ........................................................................... + uint32_t _elementSize; + + // ........................................................................... + // The actual list itself + // ........................................................................... + char* _skiplist; + + // ........................................................................... + // The probability which is used to determine the level for insertions + // into the list. Note the following + // ........................................................................... + TRI_skiplist_prob_e _prob; + int32_t _numRandom; + uint32_t* _random; + + + TRI_skiplist_node_t _startNode; + TRI_skiplist_node_t _endNode; + +} +TRI_skiplist_base_t; + + +//////////////////////////////////////////////////////////////////////////////// +// The base structure of a skiplist +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_skiplist_s { + TRI_skiplist_base_t _base; + // ........................................................................... + // callback compare function + // < 0: implies left < right + // == 0: implies left == right + // > 0: implies left > right + // ........................................................................... + int (*compareElementElement) (struct TRI_skiplist_s*, void*, void*); + int (*compareKeyElement) (struct TRI_skiplist_s*, void*, void*); +} +TRI_skiplist_t; + +//////////////////////////////////////////////////////////////////////////////// +// structure for a skiplist which allows duplicate entries +// the find returns a begin and end iterator +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_skiplist_multi_resut_s { + TRI_skiplist_node_t* _startIterator; + TRI_skiplist_node_t* _endIterator; + // this structure is not thread safe, one or both of the iterators may have + // disappeared. +} TRI_skiplist_multi_resut_t; + +typedef struct TRI_skiplist_multi_s { + TRI_skiplist_base_t _base; + // ........................................................................... + // callback compare function + // < 0: implies left < right + // == 0: implies left == right + // > 0: implies left > right + // ........................................................................... + int (*compareElementElement) (struct TRI_skiplist_multi_s*, void*, void*); + int (*compareKeyElement) (struct TRI_skiplist_multi_s*, void*, void*); +} TRI_skiplist_multi_t; + + +//////////////////////////////////////////////////////////////////////////////// +// structure for a skiplist which allows unique entries -- with locking +// available for its nearest neighbours. +// TODO: implement locking for nearest neighbours rather than for all of index +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_skiplist_synced_s { + TRI_skiplist_t _base; + TRI_read_write_lock_t _lock; +} TRI_skiplist_synced_t; + +typedef struct TRI_skiplist_synced_multi_s { + TRI_skiplist_t _base; + TRI_read_write_lock_t _lock; +} TRI_skiplist_synced_multi_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SKIP LIST +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialises a skip list +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitSkipList (TRI_skiplist_t*, + size_t elementSize, + int (*compareElementElement) (TRI_skiplist_t*, void*, void*), + int (*compareKeyElement) (TRI_skiplist_t*, void*, void*), + TRI_skiplist_prob_e, uint32_t); + +void TRI_InitSkipListMulti (TRI_skiplist_multi_t*, + size_t elementSize, + int (*compareElementElement) (TRI_skiplist_multi_t*, void*, void*), + int (*compareKeyElement) (TRI_skiplist_multi_t*, void*, void*), + TRI_skiplist_prob_e, uint32_t); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys a skip list, but does not free the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_DestroySkipList (TRI_skiplist_t*); + +void TRI_DestroySkipListMulti (TRI_skiplist_multi_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys a skip list and frees the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeSkipList (TRI_skiplist_t*); + +void TRI_FreeSkipListMulti (TRI_skiplist_multi_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup Collections +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given a key +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_LookupByKeySkipList (TRI_skiplist_t*, void* key); + +TRI_vector_pointer_t TRI_LookupByKeySkipListMulti (TRI_skiplist_multi_t*, void* key); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds an element given a key, returns NULL if not found +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_FindByKeySkipList (TRI_skiplist_t*, void* key); + +TRI_vector_pointer_t TRI_FindByKeySkipListMulti (TRI_skiplist_multi_t*, void* key); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lookups an element given an element +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_LookupByElementSkipList (TRI_skiplist_t*, void* element); + +TRI_vector_pointer_t TRI_LookupByElementSkipListMulti (TRI_skiplist_multi_t*, void* element); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds an element given an element, returns NULL if not found +//////////////////////////////////////////////////////////////////////////////// + +void* TRI_FindByElementSkipList (TRI_skiplist_t*, void* element); + +TRI_vector_pointer_t TRI_FindByElementSkipListMulti (TRI_skiplist_multi_t*, void* element); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an element to the skip list +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertElementSkipList (TRI_skiplist_t*, void* element, bool overwrite); + +bool TRI_InsertElementSkipListMulti (TRI_skiplist_multi_t*, void* element, bool overwrite); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds an key/element to the skip list +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_InsertKeySkipList (TRI_skiplist_t*, void* key, void* element, bool overwrite); + +bool TRI_InsertKeySkipListMulti (TRI_skiplist_multi_t*, void* key, void* element, bool overwrite); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an element from the skip list +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveElementSkipList (TRI_skiplist_t*, void* element, void* old); + +bool TRI_RemoveElementSkipListMulti (TRI_skiplist_multi_t*, void* element, void* old); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes an key/element to the skip list +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RemoveKeySkipList (TRI_skiplist_t*, void* key, void* old); + +bool TRI_RemoveKeySkipListMulti (TRI_skiplist_multi_t*, void* key, void* old); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + + +#ifdef __cplusplus +} +#endif + +#endif + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/SkipLists/skiplistIndex.c b/SkipLists/skiplistIndex.c new file mode 100755 index 0000000000..e27bf33976 --- /dev/null +++ b/SkipLists/skiplistIndex.c @@ -0,0 +1,489 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief skiplist index +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright by triAGENS GmbH - All rights reserved. +/// +/// The Programs (which include both the software and documentation) +/// contain proprietary information of triAGENS GmbH; they are +/// provided under a license agreement containing restrictions on use and +/// disclosure and are also protected by copyright, patent and other +/// intellectual and industrial property laws. Reverse engineering, +/// disassembly or decompilation of the Programs, except to the extent +/// required to obtain interoperability with other independently created +/// software or as specified by law, is prohibited. +/// +/// The Programs are not intended for use in any nuclear, aviation, mass +/// transit, medical, or other inherently dangerous applications. It shall +/// be the licensee's responsibility to take all appropriate fail-safe, +/// backup, redundancy, and other measures to ensure the safe use of such +/// applications if the Programs are used for such purposes, and triAGENS +/// GmbH disclaims liability for any damages caused by such use of +/// the Programs. +/// +/// This software is the confidential and proprietary information of +/// triAGENS GmbH. You shall not disclose such confidential and +/// proprietary information and shall use it only in accordance with the +/// terms of the license agreement you entered into with triAGENS GmbH. +/// +/// Copyright holder is triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. O +/// @author Copyright 2011, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "skiplistIndex.h" + +// ............................................................................ +// For now our comparison function simple compares if the memory allocated +// for the data storage is the same. +// Note that this will not necessarily place the two json objects in +// 'human' order, e.g. may not be in alpha order. +// TODO: +// (i) Determine the type of the shaped json object +// (ii) If the types match, compare as those types (e.g. integers, strings) +// (iii) If types differ, convert to string and them make the comparision +// ............................................................................ + +static int CompareShapedJsonShapedJson (const TRI_shaped_json_t* left, const TRI_shaped_json_t* right) { + + int result; + + if (left == NULL && right == NULL) { + return 0; + } + + if (left == NULL && right != NULL) { + return -1; + } + + if (left != NULL && right == NULL) { + return 1; + } + + if (left->_data.length < right->_data.length) { + return -1; + } + + if (left->_data.length > right->_data.length) { + return 1; + } + + return memcmp(left->_data.data,right->_data.data, left->_data.length); +} // end of function CompareShapedJsonShapedJson + + +// ............................................................................. +// Compare two elements and determines: +// left < right : return -1 +// left == right : return 0 +// left > right : return 1 +// ............................................................................. +static int CompareElementElement (struct TRI_skiplist_s* skiplist, + void* leftElement, void* rightElement) { + + int compareResult; + SkiplistIndexElement* hLeftElement = (SkiplistIndexElement*)(leftElement); + SkiplistIndexElement* hRightElement = (SkiplistIndexElement*)(rightElement); + + if (leftElement == NULL && rightElement == NULL) { + return 0; + } + + if (leftElement != NULL && rightElement == NULL) { + return 1; + } + + if (leftElement == NULL && rightElement != NULL) { + return -1; + } + + if (hLeftElement->numFields < hRightElement->numFields) { + return -1; // should never happen + } + + if (hLeftElement->numFields > hRightElement->numFields) { + return 1; // should never happen + } + + for (size_t j = 0; j < hLeftElement->numFields; j++) { + /* + printf("%s:%u:%f:%f\n",__FILE__,__LINE__, + *((double*)((j + hLeftElement->fields)->_data.data)), + *((double*)((j + hRightElement->fields)->_data.data)) + ); + */ + compareResult = CompareShapedJsonShapedJson((j + hLeftElement->fields), (j + hRightElement->fields)); + if (compareResult != 0) { + return compareResult; + } + } + + return 0; +} + + +// ............................................................................. +// Compare two elements and determines: +// left < right : return -1 +// left == right : return 0 +// left > right : return 1 +// ............................................................................. +static int CompareKeyElement (struct TRI_skiplist_s* skiplist, + void* leftElement, void* rightElement) { + int compareResult; + SkiplistIndexElement* hLeftElement = (SkiplistIndexElement*)(leftElement); + SkiplistIndexElement* hRightElement = (SkiplistIndexElement*)(rightElement); + + if (leftElement == NULL || rightElement == NULL) { + return false; + } + + if (hLeftElement->numFields != hRightElement->numFields) { + return false; // should never happen + } + + for (size_t j = 0; j < hLeftElement->numFields; j++) { + /* + printf("%s:%u:%f:%f\n",__FILE__,__LINE__, + *((double*)((j + hLeftElement->fields)->_data.data)), + *((double*)((j + hRightElement->fields)->_data.data)) + ); + */ + compareResult = CompareShapedJsonShapedJson((j + hLeftElement->fields), (j + hRightElement->fields)); + if (compareResult != 0) { + return compareResult; + } + } + + return 0; +} + + + +// ............................................................................. +// Creates a new skiplist +// ............................................................................. + +SkiplistIndex* SkiplistIndex_new() { + SkiplistIndex* skiplistIndex; + + skiplistIndex = TRI_Allocate(sizeof(SkiplistIndex)); + if (skiplistIndex == NULL) { + return NULL; + } + + skiplistIndex->unique = true; + skiplistIndex->skiplist.uniqueSkiplist = TRI_Allocate(sizeof(TRI_skiplist_t)); + if (skiplistIndex->skiplist.uniqueSkiplist == NULL) { + TRI_Free(skiplistIndex); + return NULL; + } + + TRI_InitSkipList(skiplistIndex->skiplist.uniqueSkiplist, + sizeof(SkiplistIndexElement), + CompareElementElement, + CompareKeyElement, + TRI_SKIPLIST_PROB_HALF, 40); + + return skiplistIndex; +} + + +// ............................................................................... +// Adds (inserts) a data element into the skip list +// ............................................................................... + +int SkiplistIndex_add(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + bool result; + result = TRI_InsertElementSkipList(skiplistIndex->skiplist.uniqueSkiplist, element, false); + if (result) { + return 0; + } + return -1; +} + + +// ............................................................................... +// Locates an entry within the unique skiplist +// ............................................................................... + +SkiplistIndexElements* SkiplistIndex_find(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + SkiplistIndexElement* result; + SkiplistIndexElements* results; + + results = TRI_Allocate(sizeof(SkiplistIndexElements)); + + result = (SkiplistIndexElement*) (TRI_LookupByElementSkipList(skiplistIndex->skiplist.uniqueSkiplist, element)); + + if (result != NULL) { + results->_elements = TRI_Allocate(sizeof(SkiplistIndexElement) * 1); // unique skiplist index maximum number is 1 + results->_elements[0] = *result; + results->_numElements = 1; + } + else { + results->_elements = NULL; + results->_numElements = 0; + } + return results; +} + + +// ............................................................................... +// An alias for addIndex +// ............................................................................... + +int SkiplistIndex_insert(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + return SkiplistIndex_add(skiplistIndex,element); +} + + +// ............................................................................... +// Removes an entry from the skip list +// ............................................................................... + +bool SkiplistIndex_remove(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + bool result; + + result = TRI_RemoveElementSkipList(skiplistIndex->skiplist.uniqueSkiplist, element, NULL); + return result; +} + + +// ............................................................................... +// updates an entry in the skip list, first removes beforeElement, +// then adds the afterElement -- should never be called here +// ............................................................................... + +bool SkiplistIndex_update(SkiplistIndex* skiplistIndex, const SkiplistIndexElement* beforeElement, + const SkiplistIndexElement* afterElement) { + assert(false); + return false; +} + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// Multi-skiplist non-unique skiplist indexes +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +// Private methods +//------------------------------------------------------------------------------ + + + +// ............................................................................. +// Returns true if document pointers are the same, otherwise returns false +// ............................................................................. +static int CompareMultiElementElement (TRI_skiplist_multi_t* multiSkiplist, + void* leftElement, void* rightElement) { + SkiplistIndexElement* hLeftElement = (SkiplistIndexElement*)(leftElement); + SkiplistIndexElement* hRightElement = (SkiplistIndexElement*)(rightElement); + int compareResult; + + if (leftElement == NULL || rightElement == NULL) { + return 0; + } + + if (leftElement == NULL || rightElement != NULL) { + return -1; + } + + if (leftElement != NULL || rightElement == NULL) { + return 1; + } + + if (leftElement == rightElement) { + return 0; + } + + for (size_t j = 0; j < hLeftElement->numFields; j++) { + /* + printf("%s:%u:%f:%f\n",__FILE__,__LINE__, + *((double*)((j + hLeftElement->fields)->_data.data)), + *((double*)((j + hRightElement->fields)->_data.data)) + ); + */ + compareResult = CompareShapedJsonShapedJson((j + hLeftElement->fields), (j + hRightElement->fields)); + if (compareResult != 0) { + return compareResult; + } + } + + return 0; +} + + +// ............................................................................. +// Returns true if the "key" matches that of the element +// ............................................................................. +static int CompareMultiKeyElement (TRI_skiplist_multi_t* multiSkiplist, + void* leftElement, void* rightElement) { + SkiplistIndexElement* hLeftElement = (SkiplistIndexElement*)(leftElement); + SkiplistIndexElement* hRightElement = (SkiplistIndexElement*)(rightElement); + int compareResult; + + if (leftElement == NULL || rightElement == NULL) { + printf("%s:%u\n",__FILE__,__LINE__); + return 0; + } + + if (leftElement == NULL || rightElement != NULL) { + printf("%s:%u\n",__FILE__,__LINE__); + return -1; + } + + if (leftElement != NULL || rightElement == NULL) { + printf("%s:%u\n",__FILE__,__LINE__); + return 1; + } + + if (leftElement == rightElement) { + printf("%s:%u\n",__FILE__,__LINE__); + return 0; + } + + printf("%s:%u",__FILE__,__LINE__); + + for (size_t j = 0; j < hLeftElement->numFields; j++) { + + printf("%s:%u:%f:%f\n",__FILE__,__LINE__, + *((double*)((j + hLeftElement->fields)->_data.data)), + *((double*)((j + hRightElement->fields)->_data.data)) + ); + + compareResult = CompareShapedJsonShapedJson((j + hLeftElement->fields), (j + hRightElement->fields)); + if (compareResult != 0) { + return compareResult; + } + } + + return 0; +} + + + + +// ............................................................................. +// Creates a new non-uniqe skip list +// ............................................................................. + +SkiplistIndex* MultiSkiplistIndex_new() { + SkiplistIndex* skiplistIndex; + + skiplistIndex = TRI_Allocate(sizeof(SkiplistIndex)); + if (skiplistIndex == NULL) { + return NULL; + } + + skiplistIndex->unique = false; + skiplistIndex->skiplist.nonUniqueSkiplist = TRI_Allocate(sizeof(TRI_skiplist_t)); + if (skiplistIndex->skiplist.nonUniqueSkiplist == NULL) { + TRI_Free(skiplistIndex); + return NULL; + } + + TRI_InitSkipListMulti(skiplistIndex->skiplist.nonUniqueSkiplist, + sizeof(SkiplistIndexElement), + CompareMultiElementElement, + CompareMultiKeyElement, + TRI_SKIPLIST_PROB_HALF, 40); + + return skiplistIndex; +} + + + + +// ............................................................................... +// Adds (inserts) a data element into a skip list +// ............................................................................... + +int MultiSkiplistIndex_add(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + bool result; + result = TRI_InsertKeySkipListMulti(skiplistIndex->skiplist.nonUniqueSkiplist, element, element, false); + if (result) { + return 0; + } + return -1; +} + + +// ............................................................................... +// Locates one or more entries within the non-unique skip list +// ............................................................................... + +SkiplistIndexElements* MultiSkiplistIndex_find(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + TRI_vector_pointer_t result; + SkiplistIndexElements* results; + size_t j; + + results = TRI_Allocate(sizeof(SkiplistIndexElements)); + + result = TRI_LookupByKeySkipListMulti (skiplistIndex->skiplist.nonUniqueSkiplist, element); + + + if (result._length == 0) { + results->_elements = NULL; + results->_numElements = 0; + } + else { + results->_numElements = result._length; + results->_elements = TRI_Allocate(sizeof(SkiplistIndexElement) * result._length); + for (j = 0; j < result._length; ++j) { + results->_elements[j] = *((SkiplistIndexElement*)(result._buffer[j])); + } + } + TRI_DestroyVectorPointer(&result); + return results; +} + + +// ............................................................................... +// An alias for addIndex +// ............................................................................... + +int MultiSkiplistIndex_insert(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + return MultiSkiplistIndex_add(skiplistIndex,element); +} + + +// ............................................................................... +// Removes an entry from the skiplist +// ............................................................................... + +bool MultiSkiplistIndex_remove(SkiplistIndex* skiplistIndex, SkiplistIndexElement* element) { + bool result; + result = TRI_RemoveElementSkipListMulti(skiplistIndex->skiplist.nonUniqueSkiplist, element, NULL); + return result; +} + + +// ............................................................................... +// updates and entry in the skiplist, first removes beforeElement, +// then adds the afterElement. Should never be called from here +// ............................................................................... + +bool MultiSkiplistIndex_update(SkiplistIndex* skiplistIndex, SkiplistIndexElement* beforeElement, + SkiplistIndexElement* afterElement) { + assert(false); + return false; +} + + + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: + + diff --git a/SkipLists/skiplistIndex.h b/SkipLists/skiplistIndex.h new file mode 100755 index 0000000000..c8e37986af --- /dev/null +++ b/SkipLists/skiplistIndex.h @@ -0,0 +1,124 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief unique hash index +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright by triAGENS GmbH - All rights reserved. +/// +/// The Programs (which include both the software and documentation) +/// contain proprietary information of triAGENS GmbH; they are +/// provided under a license agreement containing restrictions on use and +/// disclosure and are also protected by copyright, patent and other +/// intellectual and industrial property laws. Reverse engineering, +/// disassembly or decompilation of the Programs, except to the extent +/// required to obtain interoperability with other independently created +/// software or as specified by law, is prohibited. +/// +/// The Programs are not intended for use in any nuclear, aviation, mass +/// transit, medical, or other inherently dangerous applications. It shall +/// be the licensee's responsibility to take all appropriate fail-safe, +/// backup, redundancy, and other measures to ensure the safe use of such +/// applications if the Programs are used for such purposes, and triAGENS +/// GmbH disclaims liability for any damages caused by such use of +/// the Programs. +/// +/// This software is the confidential and proprietary information of +/// triAGENS GmbH. You shall not disclose such confidential and +/// proprietary information and shall use it only in accordance with the +/// terms of the license agreement you entered into with triAGENS GmbH. +/// +/// Copyright holder is triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. O +/// @author Copyright 2011, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#ifndef TRIAGENS_DURHAM_VOC_BASE_SKIPLIST_INDEX_H +#define TRIAGENS_DURHAM_VOC_BASE_SKIPLIST_INDEX_H 1 + +#include +#include "SkipLists/skiplist.h" +#include "ShapedJson/shaped-json.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// ............................................................................... +// Define the structure of a unique or non-unique hashindex +// ............................................................................... + +typedef struct { + union { + TRI_skiplist_t* uniqueSkiplist; + TRI_skiplist_multi_t* nonUniqueSkiplist; + } skiplist; + bool unique; +} SkiplistIndex; + + +typedef struct { + size_t numFields; // the number of fields + TRI_shaped_json_t* fields; // list of shaped json objects which the collection should know about + void* data; // master document pointer + void* collection; // pointer to the collection; +} SkiplistIndexElement; + +typedef struct { + size_t _numElements; + SkiplistIndexElement* _elements; // simple list of elements +} SkiplistIndexElements; + + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// Unique skiplist indexes +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ + +SkiplistIndex* SkiplistIndex_new (void); + +int SkiplistIndex_add (SkiplistIndex*, SkiplistIndexElement*); + +SkiplistIndexElements* SkiplistIndex_find (SkiplistIndex*, SkiplistIndexElement*); + +int SkiplistIndex_insert (SkiplistIndex*, SkiplistIndexElement*); + +bool SkiplistIndex_remove (SkiplistIndex*, SkiplistIndexElement*); + +bool SkiplistIndex_update (SkiplistIndex*, const SkiplistIndexElement*, const SkiplistIndexElement*); + + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// Multi-skiplist non-unique skiplist indexes +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ + + +SkiplistIndex* MultiSkiplistIndex_new (void); + +int MultiSkiplistIndex_add (SkiplistIndex*, SkiplistIndexElement*); + +SkiplistIndexElements* MultiSkiplistIndex_find (SkiplistIndex*, SkiplistIndexElement*); + +int MultiSkiplistIndex_insert (SkiplistIndex*, SkiplistIndexElement*); + +bool MultiSkiplistIndex_remove (SkiplistIndex*, SkiplistIndexElement*); + +bool MultiSkiplistIndex_update (SkiplistIndex*, SkiplistIndexElement*, SkiplistIndexElement*); + + +#ifdef __cplusplus +} +#endif + +#endif + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: + diff --git a/V8/v8-actions.cpp b/V8/v8-actions.cpp index c24d4b91fc..c7fba7ef25 100644 --- a/V8/v8-actions.cpp +++ b/V8/v8-actions.cpp @@ -29,6 +29,7 @@ #include "Basics/ReadLocker.h" #include "Basics/WriteLocker.h" +#include "Basics/StringUtils.h" #include "BasicsC/conversions.h" #include "BasicsC/logging.h" #include "Rest/HttpRequest.h" @@ -435,6 +436,24 @@ HttpResponse* TRI_ExecuteActionVocBase (TRI_vocbase_t* vocbase, // check if we know a callback map::iterator i = actions->find(name); + size_t pos = request->suffix().size(); + + if (i == actions->end()) { + // no direct callback found + + vector tmpSuffix(request->suffix()); + + // find longest prefix + while(tmpSuffix.size() > 1 && i == actions->end()) { + tmpSuffix.pop_back(); + --pos; + string tmpName = StringUtils::join(tmpSuffix, '/'); + LOG_DEBUG("find prefix '%s' for category %d", tmpName.c_str(), (int) category); + i = actions->find(tmpName); + } + + } + if (i == actions->end()) { LOG_DEBUG("unknown action '%s' for category %d", name.c_str(), (int) category); return new HttpResponse(HttpResponse::NOT_FOUND); @@ -442,9 +461,71 @@ HttpResponse* TRI_ExecuteActionVocBase (TRI_vocbase_t* vocbase, action_t* cb = (action_t*) i->second; - // that up the request + // setup the request v8::Handle req = v8::Object::New(); +// Example: +// { +// "_suffix":[ +// "suffix1", +// "suffix2" +// ], +// "_headers": +// { +// "accept":"text/html", +// "accept-encoding":"gzip, deflate", +// "accept-language":"de-de,en-us;q=0.7,en;q=0.3", +// "user-agent":"Mozilla/5.0" +// }, +// "_requestType":"GET", +// "_requestBody":"... only for PUT and POST ...", +// } + + // copy suffix + v8::Handle v8SuffixArray = v8::Array::New(); + vector const& suffix = request->suffix(); + int index = 0; + for (size_t s = pos; s < suffix.size(); ++s) { + v8SuffixArray->Set(index++, v8::String::New(suffix[s].c_str())); + } + req->Set(v8::Handle(v8::String::New("_suffix")), v8SuffixArray); + + // copy header fields + v8::Handle v8HeaderfildsObject = v8::Object::New(); + map const& headers = request->headers(); + map::const_iterator iter = headers.begin(); + for (; iter != headers.end(); ++iter) { + v8HeaderfildsObject->Set(v8::String::New(iter->first.c_str()), v8::String::New(iter->second.c_str())); + } + req->Set(v8::Handle(v8::String::New("_headers")), v8HeaderfildsObject); + + switch (request->requestType()) { + case HttpRequest::HTTP_REQUEST_POST: + req->Set(v8::Handle(v8::String::New("_requestType")), + v8::Handle(v8::String::New("POST"))); + req->Set(v8::Handle(v8::String::New("_requestBody")), + v8::Handle(v8::String::New(request->body().c_str()))); + break; + case HttpRequest::HTTP_REQUEST_PUT: + req->Set(v8::Handle(v8::String::New("_requestType")), + v8::Handle(v8::String::New("PUT"))); + req->Set(v8::Handle(v8::String::New("_requestBody")), + v8::Handle(v8::String::New(request->body().c_str()))); + break; + case HttpRequest::HTTP_REQUEST_DELETE: + req->Set(v8::Handle(v8::String::New("_requestType")), + v8::Handle(v8::String::New("DELETE"))); + break; + case HttpRequest::HTTP_REQUEST_HEAD: + req->Set(v8::Handle(v8::String::New("_requestType")), + v8::Handle(v8::String::New("HEAD"))); + break; + default: + req->Set(v8::Handle(v8::String::New("_requestType")), + v8::Handle(v8::String::New("GET"))); + } + + map values = request->values(); for (map::iterator i = values.begin(); i != values.end(); ++i) { @@ -539,6 +620,18 @@ HttpResponse* TRI_ExecuteActionVocBase (TRI_vocbase_t* vocbase, response->body().appendText(TRI_ObjectToString(res->Get(v8g->BodyKey))); } + if (res->Has(v8g->HeadersKey)) { + v8::Handle val = res->Get(v8g->HeadersKey); + v8::Handle v8Headers = val.As(); + if (v8Headers->IsObject()) { + v8::Handle props = v8Headers->GetPropertyNames(); + for (size_t i = 0; i < props->Length(); i++) { + v8::Handle key = props->Get(v8::Integer::New(i)); + response->setHeader(TRI_ObjectToString(key), TRI_ObjectToString(v8Headers->Get(key))); + } + } + } + return response; } } @@ -576,6 +669,7 @@ void TRI_InitV8Actions (v8::Handle context) { // ............................................................................. v8g->BodyKey = v8::Persistent::New(v8::String::New("body")); + v8g->HeadersKey = v8::Persistent::New(v8::String::New("headers")); v8g->ContentType = v8::Persistent::New(v8::String::New("contentType")); v8g->ParametersKey = v8::Persistent::New(v8::String::New("parameters")); v8g->ResponseCodeKey = v8::Persistent::New(v8::String::New("responseCode")); diff --git a/V8/v8-c-utils.h b/V8/v8-c-utils.h index 8052c3c2e6..6b6fb7d363 100644 --- a/V8/v8-c-utils.h +++ b/V8/v8-c-utils.h @@ -108,20 +108,27 @@ bool TRI_DefineCompareExecutionContext (TRI_js_exec_context_t, TRI_sr_documents_t*, TRI_sr_documents_t*); + //////////////////////////////////////////////////////////////////////////////// -/// @brief executes and destroys an execution context +/// @brief executes an execution context //////////////////////////////////////////////////////////////////////////////// bool TRI_ExecuteExecutionContext (TRI_js_exec_context_t, void* storage); //////////////////////////////////////////////////////////////////////////////// -/// @brief executes and destroys an execution context for a condition +/// @brief executes an execution context for a condition //////////////////////////////////////////////////////////////////////////////// bool TRI_ExecuteConditionExecutionContext (TRI_js_exec_context_t, bool* result); //////////////////////////////////////////////////////////////////////////////// -/// @brief executes and destroys an execution context for order by +/// @brief executes an execution context for a ref access +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ExecuteRefExecutionContext (TRI_js_exec_context_t, TRI_json_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes an execution context for order by //////////////////////////////////////////////////////////////////////////////// bool TRI_ExecuteOrderExecutionContext (TRI_js_exec_context_t, int* result); diff --git a/V8/v8-conv.cpp b/V8/v8-conv.cpp index 16a4c86da8..99e79099d2 100644 --- a/V8/v8-conv.cpp +++ b/V8/v8-conv.cpp @@ -496,7 +496,7 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, continue; } - if (TRI_EqualString(*keyStr, "_id")) { + if ((*keyStr)[0] == '_') { --p; continue; } @@ -1072,44 +1072,11 @@ static v8::Handle JsonShapeData (TRI_shaper_t* shaper, return v8::Null(); } -//////////////////////////////////////////////////////////////////////////////// -/// @brief converts identifier into ibject reference -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle ObjectReference (TRI_voc_cid_t cid, TRI_voc_did_t did) { - v8::HandleScope scope; - TRI_string_buffer_t buffer; - - TRI_InitStringBuffer(&buffer); - TRI_AppendUInt64StringBuffer(&buffer, cid); - TRI_AppendStringStringBuffer(&buffer, ":"); - TRI_AppendUInt64StringBuffer(&buffer, did); - - v8::Handle ref = v8::String::New(buffer._buffer); - - TRI_DestroyStringBuffer(&buffer); - - return scope.Close(ref); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- public functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup V8Conversions -/// @{ -//////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// /// @brief converts a TRI_json_t NULL into a V8 object //////////////////////////////////////////////////////////////////////////////// -v8::Handle ObjectJsonNull (TRI_json_t const* json) { +static v8::Handle ObjectJsonNull (TRI_json_t const* json) { return v8::Null(); } @@ -1117,7 +1084,7 @@ v8::Handle ObjectJsonNull (TRI_json_t const* json) { /// @brief converts a TRI_json_t BOOLEAN into a V8 object //////////////////////////////////////////////////////////////////////////////// -v8::Handle ObjectJsonBoolean (TRI_json_t const* json) { +static v8::Handle ObjectJsonBoolean (TRI_json_t const* json) { return json->_value._boolean ? v8::True() : v8::False(); } @@ -1125,7 +1092,7 @@ v8::Handle ObjectJsonBoolean (TRI_json_t const* json) { /// @brief converts a TRI_json_t NUMBER into a V8 object //////////////////////////////////////////////////////////////////////////////// -v8::Handle ObjectJsonNumber (TRI_json_t const* json) { +static v8::Handle ObjectJsonNumber (TRI_json_t const* json) { return v8::Number::New(json->_value._number); } @@ -1133,7 +1100,7 @@ v8::Handle ObjectJsonNumber (TRI_json_t const* json) { /// @brief converts a TRI_json_t NUMBER into a V8 object //////////////////////////////////////////////////////////////////////////////// -v8::Handle ObjectJsonString (TRI_json_t const* json) { +static v8::Handle ObjectJsonString (TRI_json_t const* json) { return v8::String::New(json->_value._string.data); } @@ -1141,7 +1108,7 @@ v8::Handle ObjectJsonString (TRI_json_t const* json) { /// @brief converts a TRI_json_t ARRAY into a V8 object //////////////////////////////////////////////////////////////////////////////// -v8::Handle ObjectJsonArray (TRI_json_t const* json) { +static v8::Handle ObjectJsonArray (TRI_json_t const* json) { v8::Handle object = v8::Object::New(); size_t n = json->_value._objects._length; @@ -1166,7 +1133,7 @@ v8::Handle ObjectJsonArray (TRI_json_t const* json) { /// @brief converts a TRI_json_t LIST into a V8 object //////////////////////////////////////////////////////////////////////////////// -v8::Handle ObjectJsonList (TRI_json_t const* json) { +static v8::Handle ObjectJsonList (TRI_json_t const* json) { v8::Handle object = v8::Array::New(); size_t n = json->_value._objects._length; @@ -1181,6 +1148,75 @@ v8::Handle ObjectJsonList (TRI_json_t const* json) { return object; } +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup V8Conversions +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief converts identifier into a object reference +//////////////////////////////////////////////////////////////////////////////// + +v8::Handle TRI_ObjectReference (TRI_voc_cid_t cid, TRI_voc_did_t did) { + v8::HandleScope scope; + TRI_string_buffer_t buffer; + + TRI_InitStringBuffer(&buffer); + TRI_AppendUInt64StringBuffer(&buffer, cid); + TRI_AppendStringStringBuffer(&buffer, ":"); + TRI_AppendUInt64StringBuffer(&buffer, did); + + v8::Handle ref = v8::String::New(buffer._buffer); + + TRI_DestroyStringBuffer(&buffer); + + return scope.Close(ref); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief extratcs identifiers from a object reference +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_IdentifiersObjectReference (v8::Handle value, TRI_voc_cid_t& cid, TRI_voc_did_t& did) { + bool error; + + cid = 0; + did = 0; + + if (value->IsNumber() || value->IsNumberObject()) { + did = TRI_ObjectToDouble(value, error); + return ! error; + } + + string v = TRI_ObjectToString(value); + + vector doc = StringUtils::split(v, ":"); + + switch (doc.size()) { + case 1: + did = StringUtils::uint64(doc[1]); + return did != 0; + + case 2: + cid = StringUtils::uint64(doc[0]); + did = StringUtils::uint64(doc[1]); + return cid != 0 && did != 0; + + default: + return false; + } + + return false; +} + //////////////////////////////////////////////////////////////////////////////// /// @brief converts a TRI_json_t into a V8 object //////////////////////////////////////////////////////////////////////////////// @@ -1214,45 +1250,6 @@ v8::Handle TRI_ObjectJson (TRI_json_t const* json) { return scope.Close(v8::Undefined()); } -//////////////////////////////////////////////////////////////////////////////// -/// @brief converts a TRI_rs_entry_t into a V8 object -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle TRI_ObjectRSEntry (TRI_doc_collection_t* collection, - TRI_shaper_t* shaper, - TRI_rs_entry_t const* entry) { - TRI_shape_t const* shape; - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - shape = shaper->lookupShapeId(shaper, entry->_document._sid); - - if (shape == 0) { - LOG_WARNING("cannot find shape #%u", (unsigned int) entry->_document._sid); - return v8::Null(); - } - - v8::Handle result = JsonShapeData(shaper, - shape, - entry->_document._data.data, - entry->_document._data.length); - - if (result->IsObject()) { - result->ToObject()->Set(v8g->DidKey, ObjectReference(collection->base._cid, entry->_did)); - - if (entry->_type == TRI_DOC_MARKER_EDGE) { - result->ToObject()->Set(v8g->FromKey, ObjectReference(entry->_fromCid, entry->_fromDid)); - result->ToObject()->Set(v8g->ToKey, ObjectReference(entry->_toCid, entry->_toDid)); - } - } - - if (entry->_augmented._type != TRI_JSON_UNUSED) { - TRI_AugmentObject(result, &entry->_augmented); - } - - return result; -} - //////////////////////////////////////////////////////////////////////////////// /// @brief converts a TRI_shaped_json_t into a V8 object //////////////////////////////////////////////////////////////////////////////// @@ -1283,15 +1280,15 @@ bool TRI_ObjectDocumentPointer (TRI_doc_collection_t* collection, shaped->_data.length); if (result->IsObject()) { - result->ToObject()->Set(v8g->DidKey, ObjectReference(collection->base._cid, document->_did)); + result->ToObject()->Set(v8g->DidKey, TRI_ObjectReference(collection->base._cid, document->_did)); type = ((TRI_df_marker_t*) document->_data)->_type; if (type == TRI_DOC_MARKER_EDGE) { marker = (TRI_doc_edge_marker_t*) document->_data; - result->ToObject()->Set(v8g->FromKey, ObjectReference(marker->_fromCid, marker->_fromDid)); - result->ToObject()->Set(v8g->ToKey, ObjectReference(marker->_toCid, marker->_toDid)); + result->ToObject()->Set(v8g->FromKey, TRI_ObjectReference(marker->_fromCid, marker->_fromDid)); + result->ToObject()->Set(v8g->ToKey, TRI_ObjectReference(marker->_toCid, marker->_toDid)); } } @@ -1300,27 +1297,6 @@ bool TRI_ObjectDocumentPointer (TRI_doc_collection_t* collection, return true; } -//////////////////////////////////////////////////////////////////////////////// -/// @brief converts a TRI_result_set_t into a V8 array -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle TRI_ArrayResultSet (TRI_result_set_t* rs) { - v8::Handle array = v8::Array::New(); - - TRI_doc_collection_t* collection = rs->_containerElement->_container->_collection; - TRI_shaper_t* shaper = collection->_shaper; - - size_t pos; - - for (pos = 0; rs->hasNext(rs); ++pos) { - TRI_rs_entry_t const* entry = rs->next(rs); - - array->Set(pos, TRI_ObjectRSEntry(collection, shaper, entry)); - } - - return array; -} - //////////////////////////////////////////////////////////////////////////////// /// @brief converts an V8 object to a TRI_shaped_json_t //////////////////////////////////////////////////////////////////////////////// diff --git a/V8/v8-conv.h b/V8/v8-conv.h index 0baad8dfaf..03cda939d2 100644 --- a/V8/v8-conv.h +++ b/V8/v8-conv.h @@ -31,8 +31,8 @@ #include "V8/v8-globals.h" #include "BasicsC/json.h" -#include "VocBase/simple-collection.h" #include "V8/v8-c-utils.h" +#include "VocBase/simple-collection.h" // ----------------------------------------------------------------------------- // --SECTION-- CONVERSION FUNCTIONS @@ -47,68 +47,66 @@ /// @{ //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @brief converts identifier into a object reference +//////////////////////////////////////////////////////////////////////////////// + +v8::Handle TRI_ObjectReference (TRI_voc_cid_t, TRI_voc_did_t); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief extratcs identifiers from a object reference +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_IdentifiersObjectReference (v8::Handle, TRI_voc_cid_t&, TRI_voc_did_t&); + //////////////////////////////////////////////////////////////////////////////// /// @brief converts a TRI_json_t into a V8 object //////////////////////////////////////////////////////////////////////////////// v8::Handle TRI_ObjectJson (TRI_json_t const*); -//////////////////////////////////////////////////////////////////////////////// -/// @brief converts a TRI_shaped_json_t into a V8 object -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle TRI_ObjectRSEntry (TRI_doc_collection_t* collection, - TRI_shaper_t* shaper, - TRI_rs_entry_t const* entry); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief converts a TRI_result_set_t into a V8 array -//////////////////////////////////////////////////////////////////////////////// - -v8::Handle TRI_ArrayResultSet (TRI_result_set_t* rs); - //////////////////////////////////////////////////////////////////////////////// /// @brief converts an V8 object to a TRI_shaped_json_t //////////////////////////////////////////////////////////////////////////////// -TRI_shaped_json_t* TRI_ShapedJsonV8Object (v8::Handle object, TRI_shaper_t*); +TRI_shaped_json_t* TRI_ShapedJsonV8Object (v8::Handle, TRI_shaper_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief converts an V8 object to a string //////////////////////////////////////////////////////////////////////////////// -std::string TRI_ObjectToString (v8::Handle value); +std::string TRI_ObjectToString (v8::Handle); //////////////////////////////////////////////////////////////////////////////// /// @brief converts an V8 object to a character //////////////////////////////////////////////////////////////////////////////// -char TRI_ObjectToCharacter (v8::Handle value, bool& error); +char TRI_ObjectToCharacter (v8::Handle, bool& error); //////////////////////////////////////////////////////////////////////////////// /// @brief converts an V8 object to a double //////////////////////////////////////////////////////////////////////////////// -double TRI_ObjectToDouble (v8::Handle value); +double TRI_ObjectToDouble (v8::Handle); //////////////////////////////////////////////////////////////////////////////// /// @brief converts an V8 object to a double //////////////////////////////////////////////////////////////////////////////// -double TRI_ObjectToDouble (v8::Handle value, bool& error); +double TRI_ObjectToDouble (v8::Handle, bool& error); //////////////////////////////////////////////////////////////////////////////// /// @brief converts an V8 object to a boolean //////////////////////////////////////////////////////////////////////////////// -bool TRI_ObjectToBoolean (v8::Handle value); +bool TRI_ObjectToBoolean (v8::Handle); //////////////////////////////////////////////////////////////////////////////// /// @brief converts a TRI_shaped_json_t into a V8 object //////////////////////////////////////////////////////////////////////////////// -v8::Handle TRI_JsonShapeData (TRI_shaper_t* shaper, - TRI_shape_t const* shape, +v8::Handle TRI_JsonShapeData (TRI_shaper_t*, + TRI_shape_t const*, char const* data, size_t size); @@ -133,7 +131,7 @@ v8::Handle TRI_JsonShapeData (TRI_shaper_t* shaper, /// @brief initialises the V8 conversion module //////////////////////////////////////////////////////////////////////////////// -void TRI_InitV8Conversions (v8::Handle context); +void TRI_InitV8Conversions (v8::Handle); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/V8/v8-globals.h b/V8/v8-globals.h index 15896dbba3..c30cabaa1a 100644 --- a/V8/v8-globals.h +++ b/V8/v8-globals.h @@ -42,17 +42,6 @@ #include "Basics/ReadWriteLock.h" #include "VocBase/vocbase.h" -// ----------------------------------------------------------------------------- -// --SECTION-- forward declarations -// ----------------------------------------------------------------------------- - -extern "C" { - struct TRI_fluent_query_s; - struct TRI_query_s; - struct TRI_rc_cursor_s; - struct TRI_result_set_s; -} - // ----------------------------------------------------------------------------- // --SECTION-- public types // ----------------------------------------------------------------------------- @@ -75,9 +64,11 @@ typedef struct TRI_v8_global_s { TRI_v8_global_s () : JSFluentQueries(), JSQueries(), + JSQueryInstances(), JSCursors(), JSWheres(), JSResultSets(), + JSBarriers(), Actions(), SystemActions(), ActionsLock(), @@ -85,6 +76,8 @@ typedef struct TRI_v8_global_s { EdgesColTempl(), FluentQueryTempl(), QueryTempl(), + QueryInstanceTempl(), + QueryErrorTempl(), CursorTempl(), WhereTempl(), VocbaseColTempl(), @@ -110,31 +103,43 @@ typedef struct TRI_v8_global_s { /// @brief fluent query mapping for weak pointers //////////////////////////////////////////////////////////////////////////////// - std::map< struct TRI_fluent_query_s*, v8::Persistent > JSFluentQueries; + std::map< void*, v8::Persistent > JSFluentQueries; //////////////////////////////////////////////////////////////////////////////// /// @brief query mapping for weak pointers //////////////////////////////////////////////////////////////////////////////// - std::map< struct TRI_query_s*, v8::Persistent > JSQueries; + std::map< void*, v8::Persistent > JSQueries; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief query instance mapping for weak pointers +//////////////////////////////////////////////////////////////////////////////// + + std::map< void*, v8::Persistent > JSQueryInstances; //////////////////////////////////////////////////////////////////////////////// /// @brief cursor mapping for weak pointers //////////////////////////////////////////////////////////////////////////////// - std::map< struct TRI_rc_cursor_s*, v8::Persistent > JSCursors; + std::map< void*, v8::Persistent > JSCursors; //////////////////////////////////////////////////////////////////////////////// /// @brief where clause mapping for weak pointers //////////////////////////////////////////////////////////////////////////////// - std::map< struct TRI_qry_where_s*, v8::Persistent > JSWheres; + std::map< void*, v8::Persistent > JSWheres; //////////////////////////////////////////////////////////////////////////////// /// @brief result set mapping for weak pointers //////////////////////////////////////////////////////////////////////////////// - std::map< struct TRI_result_set_s*, v8::Persistent > JSResultSets; + std::map< void*, v8::Persistent > JSResultSets; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief barrier mapping for weak pointers +//////////////////////////////////////////////////////////////////////////////// + + std::map< void*, v8::Persistent > JSBarriers; //////////////////////////////////////////////////////////////////////////////// /// @brief map of callbacks for actions @@ -191,6 +196,18 @@ typedef struct TRI_v8_global_s { v8::Persistent QueryTempl; +//////////////////////////////////////////////////////////////////////////////// +/// @brief query instance template +//////////////////////////////////////////////////////////////////////////////// + + v8::Persistent QueryInstanceTempl; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief query error template +//////////////////////////////////////////////////////////////////////////////// + + v8::Persistent QueryErrorTempl; + //////////////////////////////////////////////////////////////////////////////// /// @brief cursor template //////////////////////////////////////////////////////////////////////////////// @@ -289,6 +306,12 @@ typedef struct TRI_v8_global_s { v8::Persistent FromKey; +//////////////////////////////////////////////////////////////////////////////// +/// @brief "headers" key name +//////////////////////////////////////////////////////////////////////////////// + + v8::Persistent HeadersKey; + //////////////////////////////////////////////////////////////////////////////// /// @brief "journalSize" key name //////////////////////////////////////////////////////////////////////////////// @@ -307,6 +330,12 @@ typedef struct TRI_v8_global_s { v8::Persistent ResponseCodeKey; +//////////////////////////////////////////////////////////////////////////////// +/// @brief "_rev" key name +//////////////////////////////////////////////////////////////////////////////// + + v8::Persistent RevKey; + //////////////////////////////////////////////////////////////////////////////// /// @brief "syncAfterBytes" key name //////////////////////////////////////////////////////////////////////////////// diff --git a/V8/v8-line-editor.cpp b/V8/v8-line-editor.cpp index 09524f9034..91a90a688d 100644 --- a/V8/v8-line-editor.cpp +++ b/V8/v8-line-editor.cpp @@ -130,7 +130,7 @@ static char* CompletionGenerator (char const* text, int state) { // compute all possible completions v8::Handle properties; - v8::Handle cpl = v8::String::New("COMPLETIONS"); + v8::Handle cpl = v8::String::New("_COMPLETIONS"); if (current->HasOwnProperty(cpl)) { v8::Handle funcVal = current->Get(cpl); @@ -155,16 +155,19 @@ static char* CompletionGenerator (char const* text, int state) { for (size_t i = 0; i < n; ++i) { v8::Handle v = properties->Get(i); - + v8::String::Utf8Value str(v); char const* s = *str; if (s != 0) { + + string x = (current->Get(v)->IsFunction()) ? "()" : ""; + if (*prefix == '\0') { - result.push_back(path + s); + result.push_back(path + s + x); } else if (TRI_IsPrefixString(s, prefix)) { - result.push_back(path + s); + result.push_back(path + s + x); } } } @@ -396,7 +399,9 @@ bool V8LineEditor::open () { //////////////////////////////////////////////////////////////////////////////// bool V8LineEditor::close () { - return write_history(getHistoryPath().c_str()); + bool result = write_history(getHistoryPath().c_str()); + + return result; } @@ -436,13 +441,14 @@ char* V8LineEditor::prompt (char const* prompt) { } char const* sep = ""; + char* originalLine = 0; while (true) { char* result = readline(p); + originalLine = result; p = dotdot.c_str(); if (result == 0) { - // give up, if the user pressed control-D on the top-most level if (_current.empty()) { return 0; @@ -477,11 +483,17 @@ char* V8LineEditor::prompt (char const* prompt) { if (ok) { break; } + TRI_Free(originalLine); } char* line = TRI_DuplicateString(_current.c_str()); _current.clear(); + // avoid memleaks + if (originalLine != 0) { + TRI_Free(originalLine); + } + return line; } diff --git a/V8/v8-shell.cpp b/V8/v8-shell.cpp index ce41a149bb..ea0162ff2d 100644 --- a/V8/v8-shell.cpp +++ b/V8/v8-shell.cpp @@ -325,7 +325,7 @@ static v8::Handle JS_ProcessJsonFile (v8::Arguments const& argv) { void TRI_InitV8Shell (v8::Handle context) { v8::HandleScope scope; - + // ............................................................................. // create the global functions // ............................................................................. diff --git a/V8/v8-utils.cpp b/V8/v8-utils.cpp index c9b5bf4af0..88b20a3b20 100644 --- a/V8/v8-utils.cpp +++ b/V8/v8-utils.cpp @@ -204,6 +204,11 @@ bool TRI_DefineWhereExecutionContext (TRI_js_exec_context_t context, } ctx->_arguments->Set(v8::String::New(part->_alias), result); } + + if (part->_extraData._size) { + // make extra values available + ctx->_arguments->Set(v8::String::New(part->_extraData._alias), v8::Number::New(*((double*) part->_extraData._singleValue))); + } } else { // part is a multi-document container @@ -221,6 +226,20 @@ bool TRI_DefineWhereExecutionContext (TRI_js_exec_context_t context, } } ctx->_arguments->Set(v8::String::New(part->_alias), array); + + if (part->_extraData._size) { + // make extra values available + v8::Handle array = v8::Array::New(); + size_t pos = 0; + for (size_t n = 0; n < part->_extraData._listValues._length; n++) { + double* data = (double*) part->_extraData._listValues._buffer[n]; + if (data) { + v8::Handle result; + array->Set(pos++, v8::Number::New(*data)); + } + } + ctx->_arguments->Set(v8::String::New(part->_extraData._alias), array); + } } } @@ -254,7 +273,7 @@ bool TRI_DefineSelectExecutionContext (TRI_js_exec_context_t context, num = *numPtr++; docPtr = (TRI_sr_documents_t*) numPtr; - if (part->_type == RESULT_PART_SINGLE) { + if (part->_type == RESULT_PART_DOCUMENT_SINGLE) { document = (TRI_sr_documents_t) *docPtr++; if (!document) { ctx->_arguments->Set(v8::String::New(part->_alias), v8::Null()); @@ -270,7 +289,7 @@ bool TRI_DefineSelectExecutionContext (TRI_js_exec_context_t context, ctx->_arguments->Set(v8::String::New(part->_alias), result); } } - else { + else if (part->_type == RESULT_PART_DOCUMENT_MULTI) { // part is a multi-document container v8::Handle array = v8::Array::New(); size_t pos = 0; @@ -289,6 +308,21 @@ bool TRI_DefineSelectExecutionContext (TRI_js_exec_context_t context, } ctx->_arguments->Set(v8::String::New(part->_alias), array); } + else if (part->_type == RESULT_PART_VALUE_SINGLE) { + void* value = (void*) docPtr; + ctx->_arguments->Set(v8::String::New(part->_alias), v8::Number::New(*(double*) value)); + docPtr = (TRI_sr_documents_t*) ((uint8_t*) docPtr + part->_extraDataSize); + } + else if (part->_type == RESULT_PART_VALUE_MULTI) { + v8::Handle array = v8::Array::New(); + size_t pos = 0; + for (size_t i = 0; i < num; i++) { + void* value = (void*) docPtr; + array->Set(pos++, v8::Number::New(*(double*) value)); + docPtr = (TRI_sr_documents_t*) ((uint8_t*) docPtr + part->_extraDataSize); + } + ctx->_arguments->Set(v8::String::New(part->_alias), array); + } numPtr = (TRI_select_size_t*) docPtr; } @@ -316,7 +350,7 @@ static bool MakeObject (TRI_select_result_t* result, TRI_sr_documents_t* docPtr, num = *numPtr++; docPtr = (TRI_sr_documents_t*) numPtr; - if (part->_type == RESULT_PART_SINGLE) { + if (part->_type == RESULT_PART_DOCUMENT_SINGLE) { document = (TRI_sr_documents_t) *docPtr++; if (!document) { obj->Set(v8::String::New(part->_alias), v8::Null()); @@ -332,7 +366,7 @@ static bool MakeObject (TRI_select_result_t* result, TRI_sr_documents_t* docPtr, obj->Set(v8::String::New(part->_alias), result); } } - else { + else if (part->_type == RESULT_PART_DOCUMENT_MULTI) { // part is a multi-document container v8::Handle array = v8::Array::New(); size_t pos = 0; @@ -351,6 +385,21 @@ static bool MakeObject (TRI_select_result_t* result, TRI_sr_documents_t* docPtr, } obj->Set(v8::String::New(part->_alias), array); } + else if (part->_type == RESULT_PART_VALUE_SINGLE) { + void* value = (void*) docPtr; + obj->Set(v8::String::New(part->_alias), v8::Number::New(*(double*) value)); + docPtr = (TRI_sr_documents_t*) ((uint8_t*) docPtr + part->_extraDataSize); + } + else if (part->_type == RESULT_PART_VALUE_MULTI) { + v8::Handle array = v8::Array::New(); + size_t pos = 0; + for (size_t i = 0; i < num; i++) { + void* value = (void*) docPtr; + array->Set(pos++, v8::Number::New(*(double*) value)); + docPtr = (TRI_sr_documents_t*) ((uint8_t*) docPtr + part->_extraDataSize); + } + obj->Set(v8::String::New(part->_alias), array); + } numPtr = (TRI_select_size_t*) docPtr; } @@ -385,7 +434,7 @@ bool TRI_DefineCompareExecutionContext (TRI_js_exec_context_t context, } //////////////////////////////////////////////////////////////////////////////// -/// @brief executes and destroys an execution context +/// @brief executes an execution context //////////////////////////////////////////////////////////////////////////////// bool TRI_ExecuteExecutionContext (TRI_js_exec_context_t context, void* storage) { @@ -408,7 +457,7 @@ bool TRI_ExecuteExecutionContext (TRI_js_exec_context_t context, void* storage) } //////////////////////////////////////////////////////////////////////////////// -/// @brief executes and destroys an execution context for a condition +/// @brief executes an execution context for a condition //////////////////////////////////////////////////////////////////////////////// bool TRI_ExecuteConditionExecutionContext (TRI_js_exec_context_t context, bool* r) { @@ -432,7 +481,52 @@ bool TRI_ExecuteConditionExecutionContext (TRI_js_exec_context_t context, bool* } //////////////////////////////////////////////////////////////////////////////// -/// @brief executes and destroys an execution context for order by +/// @brief executes an execution context for ref access +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ExecuteRefExecutionContext (TRI_js_exec_context_t context, TRI_json_t* r) { + js_exec_context_t* ctx; + + ctx = (js_exec_context_t*) context; + + // convert back into a handle + v8::Persistent func = ctx->_func; + + // and execute the function + v8::Handle args[] = { ctx->_arguments }; + v8::Handle result = func->Call(func, 1, args); + + if (result.IsEmpty() || !result->IsArray()) { + return false; + } + + v8::Handle obj = result->ToObject(); + + size_t position = 0; + while (true) { + if (!obj->Has(position)) { + break; + } + v8::Handle parameter = obj->Get(position++); + if (parameter->IsNumber()) { + v8::Handle numberParameter = parameter->ToNumber(); + TRI_PushBack2ListJson(r, TRI_CreateNumberJson(numberParameter->Value())); + } + else if (parameter->IsString() ) { + v8::Handle stringParameter= parameter->ToString(); + v8::String::Utf8Value str(stringParameter); + TRI_PushBack2ListJson(r, TRI_CreateStringCopyJson(*str)); + } + else { + continue; + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes an execution context for order by //////////////////////////////////////////////////////////////////////////////// bool TRI_ExecuteOrderExecutionContext (TRI_js_exec_context_t context, int* r) { diff --git a/V8/v8-vocbase.cpp b/V8/v8-vocbase.cpp index fb52f076e0..bbf8470d73 100644 --- a/V8/v8-vocbase.cpp +++ b/V8/v8-vocbase.cpp @@ -30,26 +30,20 @@ #include "Basics/StringUtils.h" #include "BasicsC/conversions.h" #include "BasicsC/csv.h" +#include "BasicsC/json.h" #include "BasicsC/logging.h" #include "BasicsC/strings.h" -#include "QL/ParserWrapper.h" #include "ShapedJson/shape-accessor.h" #include "ShapedJson/shaped-json.h" #include "V8/v8-conv.h" #include "V8/v8-utils.h" -#include "VocBase/fluent-query.h" #include "VocBase/query.h" +#include "VocBase/query-base.h" +#include "VocBase/query-parse.h" #include "VocBase/simple-collection.h" using namespace std; using namespace triagens::basics; -using namespace triagens::avocado; - -// ----------------------------------------------------------------------------- -// --SECTION-- forward declarations -// ----------------------------------------------------------------------------- - -static bool OptimiseQuery (v8::Handle queryObject); // ----------------------------------------------------------------------------- // --SECTION-- private constants @@ -78,6 +72,12 @@ static int const SLOT_CLASS = 1; static int const SLOT_QUERY = 2; +//////////////////////////////////////////////////////////////////////////////// +/// @brief slot for a "barrier" +//////////////////////////////////////////////////////////////////////////////// + +static int const SLOT_BARRIER = 2; + //////////////////////////////////////////////////////////////////////////////// /// @brief slot for a "result set" //////////////////////////////////////////////////////////////////////////////// @@ -114,17 +114,28 @@ static int32_t const WRP_QRY_WHERE_TYPE = 3; static int32_t const WRP_RC_CURSOR_TYPE = 4; +//////////////////////////////////////////////////////////////////////////////// +/// @brief wrapped class for TRI_query_instance_t +//////////////////////////////////////////////////////////////////////////////// + +static int32_t const WRP_QUERY_INSTANCE_TYPE = 5; + //////////////////////////////////////////////////////////////////////////////// /// @brief wrapped class for TRI_query_t //////////////////////////////////////////////////////////////////////////////// -static int32_t const WRP_QUERY_TYPE = 5; +static int32_t const WRP_QUERY_TYPE = 6; //////////////////////////////////////////////////////////////////////////////// /// @brief wrapped class for TRI_shaped_json_t +/// +/// Layout: +/// - SLOT_CLASS_TYPE +/// - SLOT_CLASS +/// - SLOT_BARRIER //////////////////////////////////////////////////////////////////////////////// -static int32_t const WRP_SHAPED_JSON_TYPE = 6; +static int32_t const WRP_SHAPED_JSON_TYPE = 7; //////////////////////////////////////////////////////////////////////////////// /// @} @@ -134,6 +145,25 @@ static int32_t const WRP_SHAPED_JSON_TYPE = 6; // --SECTION-- HELPER FUNCTIONS // ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- +// --SECTION-- private types +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +typedef struct { + double _distance; + void const* _data; +} +geo_coordinate_distance_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + // ----------------------------------------------------------------------------- // --SECTION-- private functions // ----------------------------------------------------------------------------- @@ -156,7 +186,7 @@ static v8::Handle WrapClass (v8::Persistent clas // create the new handle to return, and set its template type v8::Handle result = classTempl->NewInstance(); - // point the 0 index Field to the c++ pointer for unwrapping later + // set the c++ pointer for unwrapping later result->SetInternalField(SLOT_CLASS_TYPE, v8::Integer::New(type)); result->SetInternalField(SLOT_CLASS, v8::External::New(y)); @@ -169,7 +199,7 @@ static v8::Handle WrapClass (v8::Persistent clas template static T* UnwrapClass (v8::Handle obj, int32_t type) { - if (obj->InternalFieldCount() < SLOT_CLASS) { + if (obj->InternalFieldCount() <= SLOT_CLASS) { return 0; } @@ -222,6 +252,7 @@ static bool IsDocumentId (v8::Handle arg, TRI_voc_cid_t& cid, TRI_voc static TRI_vocbase_col_t const* LoadCollection (v8::Handle collection, v8::Handle* err) { + TRI_vocbase_col_t const* col = UnwrapClass(collection, WRP_VOCBASE_COL_TYPE); if (col == 0) { @@ -258,9 +289,7 @@ static TRI_vocbase_col_t const* LoadCollection (v8::Handle collectio } else { LOG_INFO("loading collection: '%s'", col->_name); - col = TRI_LoadCollectionVocBase(col->_vocbase, col->_name); - LOG_DEBUG("collection loaded"); } @@ -277,6 +306,93 @@ static TRI_vocbase_col_t const* LoadCollection (v8::Handle collectio return col; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief sorts geo coordinates +//////////////////////////////////////////////////////////////////////////////// + +static int CompareGeoCoordinateDistance (geo_coordinate_distance_t* left, geo_coordinate_distance_t* right) { + if (left->_distance < right->_distance) { + return -1; + } + else if (left->_distance > right->_distance) { + return 1; + } + else { + return 0; + } +} + +#define FSRT_NAME SortGeoCoordinates +#define FSRT_NAM2 SortGeoCoordinatesTmp +#define FSRT_TYPE geo_coordinate_distance_t + +#define FSRT_COMP(l,r,s) CompareGeoCoordinateDistance(l,r) + +uint32_t FSRT_Rand = 0; + +static uint32_t RandomGeoCoordinateDistance (void) { + return (FSRT_Rand = FSRT_Rand * 31415 + 27818); +} + +#define FSRT__RAND \ + ((fs_b) + FSRT__UNIT * (RandomGeoCoordinateDistance() % FSRT__DIST(fs_e,fs_b,FSRT__SIZE))) + +#include + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create result +//////////////////////////////////////////////////////////////////////////////// + +static void StoreGeoResult (TRI_vocbase_col_t const* collection, + GeoCoordinates* cors, + v8::Handle& documents, + v8::Handle& distances) { + GeoCoordinate* end; + GeoCoordinate* ptr; + TRI_doc_mptr_t const** wtr; + double* dtr; + geo_coordinate_distance_t* gnd; + geo_coordinate_distance_t* gtr; + geo_coordinate_distance_t* tmp; + size_t n; + uint32_t i; + TRI_barrier_t* barrier; + + // sort the result + n = cors->length; + + if (n == 0) { + return; + } + + gtr = (tmp = (geo_coordinate_distance_t*) TRI_Allocate(sizeof(geo_coordinate_distance_t) * n)); + gnd = tmp + n; + + ptr = cors->coordinates; + end = cors->coordinates + n; + + dtr = cors->distances; + + for (; ptr < end; ++ptr, ++dtr, ++gtr) { + gtr->_distance = *dtr; + gtr->_data = ptr->data; + } + + GeoIndex_CoordinatesFree(cors); + + SortGeoCoordinates(tmp, gnd); + + barrier = TRI_CreateBarrierElement(&((TRI_doc_collection_t*) collection->_collection)->_barrierList); + + // copy the documents + for (gtr = tmp, i = 0; gtr < gnd; ++gtr, ++wtr, ++i) { + documents->Set(i, TRI_WrapShapedJson(collection, (TRI_doc_mptr_t const*) gtr->_data, barrier)); + distances->Set(i, v8::Number::New(gtr->_distance)); + } + + TRI_Free(tmp); +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -294,403 +410,132 @@ static TRI_vocbase_col_t const* LoadCollection (v8::Handle collectio /// @{ //////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -/// @brief weak reference callback for result sets -//////////////////////////////////////////////////////////////////////////////// - -static void WeakResultSetCallback (v8::Persistent object, void* parameter) { - TRI_result_set_t* rs; - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - rs = (TRI_result_set_t*) parameter; - - LOG_TRACE("weak-callback for result-set called"); - - // find the persistent handle - v8::Persistent persistent = v8g->JSResultSets[rs]; - v8g->JSResultSets.erase(rs); - - // dispose and clear the persistent handle - persistent.Dispose(); - persistent.Clear(); - - // and free the result set - rs->free(rs); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief stores a result set in a javascript object -//////////////////////////////////////////////////////////////////////////////// - -static void StoreResultSet (v8::Handle rsObject, - TRI_result_set_t* rs) { - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - if (v8g->JSResultSets.find(rs) == v8g->JSResultSets.end()) { - v8::Persistent persistent = v8::Persistent::New(v8::External::New(rs)); - - rsObject->SetInternalField(SLOT_RESULT_SET, persistent); - - v8g->JSResultSets[rs] = persistent; - - persistent.MakeWeak(rs, WeakResultSetCallback); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief weak reference callback for queries -//////////////////////////////////////////////////////////////////////////////// - -static void WeakFluentQueryCallback (v8::Persistent object, void* parameter) { - TRI_fluent_query_t* query; - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - query = (TRI_fluent_query_t*) parameter; - - LOG_TRACE("weak-callback for query called"); - - // find the persistent handle - v8::Persistent persistent = v8g->JSFluentQueries[query]; - v8g->JSFluentQueries.erase(query); - - // dispose and clear the persistent handle - persistent.Dispose(); - persistent.Clear(); - - // and free the result set - query->free(query, true); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief stores a fluent query in a javascript object -//////////////////////////////////////////////////////////////////////////////// - -static void StoreFluentQuery (v8::Handle queryObject, - TRI_fluent_query_t* query) { - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - if (v8g->JSFluentQueries.find(query) == v8g->JSFluentQueries.end()) { - v8::Persistent persistent = v8::Persistent::New(v8::External::New(query)); - - queryObject->SetInternalField(SLOT_QUERY, persistent); - queryObject->SetInternalField(SLOT_RESULT_SET, v8::Null()); - - v8g->JSFluentQueries[query] = persistent; - - persistent.MakeWeak(query, WeakFluentQueryCallback); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief extracts a query from a javascript object -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* ExtractFluentQuery (v8::Handle queryObject, - v8::Handle* err) { - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // the internal fields QUERY and RESULT_SET must be present - if (queryObject->InternalFieldCount() <= SLOT_RESULT_SET) { - *err = v8::String::New("corrupted query"); - return 0; - } - - v8::Handle value = queryObject->GetInternalField(SLOT_QUERY); - - // ............................................................................. - // special case: the whole collection - // ............................................................................. - - if (value == v8g->CollectionQueryType) { - TRI_vocbase_col_t const* collection = LoadCollection(queryObject, err); - - if (collection == 0) { - return false; - } - - TRI_fluent_query_t* query = TRI_CreateCollectionQuery(collection); - - StoreFluentQuery(queryObject, query); - - return query; - } - - // ............................................................................. - // standard case: a normal query - // ............................................................................. - - else { - TRI_fluent_query_t* query = static_cast(v8::Handle::Cast(value)->Value()); - - if (query == 0) { - *err = v8::String::New("corrupted query"); - return 0; - } - - return query; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a query or uses existing result set -//////////////////////////////////////////////////////////////////////////////// - -static TRI_result_set_t* ExecuteFluentQuery (v8::Handle queryObject, - v8::Handle* err) { - v8::Handle self = queryObject->ToObject(); - - if (self->InternalFieldCount() <= SLOT_RESULT_SET) { - *err = v8::String::New("corrupted query"); - return 0; - } - - v8::Handle value = self->GetInternalField(SLOT_RESULT_SET); - - // ............................................................................. - // case: unexecuted query - // ............................................................................. - - if (value->IsNull()) { - LOG_TRACE("executing query"); - - bool ok = OptimiseQuery(self); - - if (! ok) { - *err = v8::String::New("corrupted query"); - return 0; - } - - TRI_fluent_query_t* query = ExtractFluentQuery(self, err); - - if (query == 0) { - return 0; - } - - // execute the query and get a result set - TRI_result_set_t* rs = TRI_ExecuteQuery(query); - - if (rs == 0) { - *err = v8::String::New("cannot execute query"); - return 0; - } - - if (rs->_error != 0) { - *err = v8::String::New(rs->_error); - rs->free(rs); - - return 0; - } - - StoreResultSet(queryObject, rs); - - return rs; - } - - // ............................................................................. - // case: already executed query - // ............................................................................. - - else { - TRI_result_set_t* rs = static_cast(v8::Handle::Cast(value)->Value()); - - if (rs == 0) { - *err = v8::String::New("cannot extract result set"); - return 0; - } - - return rs; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns true if a query has been executed -//////////////////////////////////////////////////////////////////////////////// - -static bool IsExecutedQuery (v8::Handle query) { - if (query->InternalFieldCount() <= SLOT_RESULT_SET) { - return false; - } - - v8::Handle value = query->GetInternalField(SLOT_RESULT_SET); - - return value->IsNull() ? false : true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief stringifies a query -//////////////////////////////////////////////////////////////////////////////// - -static string StringifyQuery (v8::Handle queryObject) { - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - if (! queryObject->IsObject()) { - return "[unknown]"; - } - - v8::Handle self = queryObject->ToObject(); - - if (self->InternalFieldCount() <= SLOT_RESULT_SET) { - return "[unknown]"; - } - - v8::Handle value = self->GetInternalField(SLOT_QUERY); - - // ............................................................................. - // special case: the whole collection - // ............................................................................. - - if (value == v8g->CollectionQueryType) { - TRI_vocbase_col_t const* col = UnwrapClass(self, WRP_VOCBASE_COL_TYPE); - - if (col == 0) { - return "[unknown collection]"; - } - - return "[collection \"" + string(col->_name) + "\"]"; - } - - // ............................................................................. - // standard case: a normal query - // ............................................................................. - - else { - TRI_fluent_query_t* query = static_cast(v8::Handle::Cast(value)->Value()); - - if (query == 0) { - return "[corrupted query]"; - } - - TRI_string_buffer_t buffer; - TRI_InitStringBuffer(&buffer); - - query->stringify(query, &buffer); - string name = TRI_BeginStringBuffer(&buffer); - - TRI_DestroyStringBuffer(&buffer); - - return name; - } - - return TRI_DuplicateString("[corrupted]"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a query -//////////////////////////////////////////////////////////////////////////////// - -static bool OptimiseQuery (v8::Handle queryObject) { - v8::Handle value; - TRI_v8_global_t* v8g; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - value = queryObject->GetInternalField(SLOT_QUERY); - - if (value != v8g->CollectionQueryType) { - TRI_fluent_query_t* query = static_cast(v8::Handle::Cast(value)->Value()); - - if (query == 0) { - return false; - } - - TRI_fluent_query_t* optimised = query; - - optimised->optimise(&optimised); - - if (optimised != query) { - - // remove old query - v8::Persistent persistent = v8g->JSFluentQueries[query]; - - v8g->JSFluentQueries.erase(query); - persistent.Dispose(); - persistent.Clear(); - - // add optimised query - persistent = v8::Persistent::New(v8::External::New(optimised)); - queryObject->SetInternalField(SLOT_QUERY, persistent); - - v8g->JSFluentQueries[optimised] = persistent; - - persistent.MakeWeak(optimised, WeakFluentQueryCallback); - } - } - - return true; -} - //////////////////////////////////////////////////////////////////////////////// /// @brief looks up edges //////////////////////////////////////////////////////////////////////////////// static v8::Handle EdgesQuery (TRI_edge_direction_e direction, v8::Arguments const& argv) { - TRI_v8_global_t* v8g; v8::HandleScope scope; - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query + // extract the collection v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - if (opQuery == 0) { + v8::Handle err; + TRI_vocbase_col_t const* collection = LoadCollection(operand, &err); + + if (collection == 0) { return scope.Close(v8::ThrowException(err)); } + + // handle various collection types + TRI_doc_collection_t* doc = collection->_collection; - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); + if (doc->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); } - // first and only argument schould be an document idenfifier + TRI_sim_collection_t* sim = (TRI_sim_collection_t*) doc; + + // first and only argument schould be a list of document idenfifier if (argv.Length() != 1) { switch (direction) { case TRI_EDGE_UNUSED: - return scope.Close(v8::ThrowException(v8::String::New("usage: noneEdge()"))); + return scope.Close(v8::ThrowException(v8::String::New("usage: edge()"))); case TRI_EDGE_IN: - return scope.Close(v8::ThrowException(v8::String::New("usage: inEdge()"))); + return scope.Close(v8::ThrowException(v8::String::New("usage: inEdge()"))); case TRI_EDGE_OUT: - return scope.Close(v8::ThrowException(v8::String::New("usage: outEdge()"))); + return scope.Close(v8::ThrowException(v8::String::New("usage: outEdge()"))); case TRI_EDGE_ANY: - return scope.Close(v8::ThrowException(v8::String::New("usage: edge()"))); + return scope.Close(v8::ThrowException(v8::String::New("usage: edge()"))); } } - if (! argv[0]->IsObject()) { - return scope.Close(v8::ThrowException(v8::String::New(" must be an object"))); - } - - TRI_vocbase_col_t const* edges = LoadCollection(argv[0]->ToObject(), &err); - - if (edges == 0) { - return scope.Close(v8::ThrowException(err)); - } + // setup result + v8::Handle documents = v8::Array::New(); // ............................................................................. - // create new query + // inside a read transaction // ............................................................................. - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); + collection->_collection->beginRead(collection->_collection); - StoreFluentQuery(result, TRI_CreateEdgesQuery(edges, opQuery->clone(opQuery), direction)); + TRI_barrier_t* barrier = 0; + size_t count = 0; - return scope.Close(result); + // argument is a list of vertices + if (argv[0]->IsArray()) { + v8::Handle vertices = v8::Handle::Cast(argv[0]); + uint32_t len = vertices->Length(); + + for (uint32_t i = 0; i < len; ++i) { + TRI_vector_pointer_t edges; + v8::Handle val = vertices->Get(i); + + TRI_voc_cid_t cid; + TRI_voc_did_t did; + bool ok; + + ok = TRI_IdentifiersObjectReference(vertices->Get(i), cid, did); + + if (! ok || cid == 0) { + continue; + } + + edges = TRI_LookupEdgesSimCollection(sim, direction, cid, did); + + for (size_t j = 0; j < edges._length; ++j) { + if (barrier == 0) { + barrier = TRI_CreateBarrierElement(&doc->_barrierList); + } + + documents->Set(count++, TRI_WrapShapedJson(collection, (TRI_doc_mptr_t const*) edges._buffer[j], barrier)); + } + + TRI_DestroyVectorPointer(&edges); + } + } + + // argument is a single vertex + else { + TRI_vector_pointer_t edges; + TRI_voc_cid_t cid; + TRI_voc_did_t did; + bool ok; + + ok = TRI_IdentifiersObjectReference(argv[0], cid, did); + + if (! ok) { + collection->_collection->endRead(collection->_collection); + return scope.Close(v8::ThrowException(v8::String::New(" must be an array or a single object-reference"))); + } + + edges = TRI_LookupEdgesSimCollection(sim, direction, cid, did); + + for (size_t j = 0; j < edges._length; ++j) { + if (barrier == 0) { + barrier = TRI_CreateBarrierElement(&doc->_barrierList); + } + + documents->Set(count++, TRI_WrapShapedJson(collection, (TRI_doc_mptr_t const*) edges._buffer[j], barrier)); + } + + TRI_DestroyVectorPointer(&edges); + } + + collection->_collection->endRead(collection->_collection); + + // ............................................................................. + // outside a write transaction + // ............................................................................. + + return scope.Close(documents); } //////////////////////////////////////////////////////////////////////////////// -/// @brief weak reference callback for queries +/// @brief weak reference callback for query //////////////////////////////////////////////////////////////////////////////// static void WeakQueryCallback (v8::Persistent object, void* parameter) { @@ -710,7 +555,7 @@ static void WeakQueryCallback (v8::Persistent object, void* parameter persistent.Dispose(); persistent.Clear(); - // and free the result set + // and free the instance TRI_FreeQuery(query); } @@ -720,11 +565,11 @@ static void WeakQueryCallback (v8::Persistent object, void* parameter static v8::Handle WrapQuery (TRI_query_t* query) { TRI_v8_global_t* v8g; - + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); v8::Handle queryObject = v8g->QueryTempl->NewInstance(); - map< TRI_query_t*, v8::Persistent >::iterator i = v8g->JSQueries.find(query); + map< void*, v8::Persistent >::iterator i = v8g->JSQueries.find(query); if (i == v8g->JSQueries.end()) { v8::Persistent persistent = v8::Persistent::New(v8::External::New(query)); @@ -745,7 +590,82 @@ static v8::Handle WrapQuery (TRI_query_t* query) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief executes a query or uses existing result set +/// @brief weak reference callback for query instances +//////////////////////////////////////////////////////////////////////////////// + +static void WeakQueryInstanceCallback (v8::Persistent object, void* parameter) { + TRI_query_instance_t* instance; + TRI_v8_global_t* v8g; + + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + instance = (TRI_query_instance_t*) parameter; + + LOG_TRACE("weak-callback for query instance called"); + + // find the persistent handle + v8::Persistent persistent = v8g->JSQueryInstances[instance]; + v8g->JSQueryInstances.erase(instance); + + // dispose and clear the persistent handle + persistent.Dispose(); + persistent.Clear(); + + // and free the instance + TRI_FreeQueryInstance(instance); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief stores a query instance in a javascript object +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle WrapQueryInstance (TRI_query_instance_t* instance) { + TRI_v8_global_t* v8g; + + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + + v8::Handle queryInstance = v8g->QueryInstanceTempl->NewInstance(); + map< void*, v8::Persistent >::iterator i = v8g->JSQueryInstances.find(instance); + + if (i == v8g->JSQueryInstances.end()) { + v8::Persistent persistent = v8::Persistent::New(v8::External::New(instance)); + + queryInstance->SetInternalField(SLOT_CLASS_TYPE, v8::Integer::New(WRP_QUERY_INSTANCE_TYPE)); + queryInstance->SetInternalField(SLOT_CLASS, persistent); + + v8g->JSQueryInstances[instance] = persistent; + + persistent.MakeWeak(instance, WeakQueryInstanceCallback); + } + else { + queryInstance->SetInternalField(SLOT_CLASS_TYPE, v8::Integer::New(WRP_QUERY_INSTANCE_TYPE)); + queryInstance->SetInternalField(SLOT_CLASS, i->second); + } + + return queryInstance; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a query error in a javascript object +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle CreateQueryErrorObject (TRI_query_error_t* error) { + TRI_v8_global_t* v8g; + + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + + v8::Handle errorObject = v8g->QueryErrorTempl->NewInstance(); + errorObject->Set(v8::String::New("code"), + v8::Integer::New(TRI_GetCodeQueryError(error)), + v8::ReadOnly); + errorObject->Set(v8::String::New("message"), + v8::String::New(TRI_GetStringQueryError(error)), + v8::ReadOnly); + + return errorObject; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes a query or uses existing result set - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static TRI_rc_cursor_t* ExecuteQuery (v8::Handle queryObject, @@ -753,12 +673,11 @@ static TRI_rc_cursor_t* ExecuteQuery (v8::Handle queryObject, v8::TryCatch tryCatch; TRI_query_t* query = UnwrapClass(queryObject, WRP_QUERY_TYPE); - if (query == 0) { *err = v8::String::New("corrupted query"); return 0; } - + LOG_TRACE("executing query"); TRI_rc_context_t* context = TRI_CreateContextQuery(query); @@ -791,6 +710,55 @@ static TRI_rc_cursor_t* ExecuteQuery (v8::Handle queryObject, return cursor; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes a query instance or uses existing result set +//////////////////////////////////////////////////////////////////////////////// + +static TRI_rc_cursor_t* ExecuteQueryInstance (v8::Handle queryObject, + v8::Handle* err) { + v8::TryCatch tryCatch; + + TRI_query_instance_t* instance = UnwrapClass(queryObject, WRP_QUERY_INSTANCE_TYPE); + + if (!instance) { + *err = v8::String::New("corrupted query instance"); + return 0; + } + + TRI_query_t* query = instance->_query; + + LOG_TRACE("executing query"); + + TRI_rc_context_t* context = TRI_CreateContextQuery(query); + + if (!context) { + if (tryCatch.HasCaught()) { + *err = tryCatch.Exception(); + } + else { + *err = v8::String::New("cannot create query context"); + } + + return 0; + } + + TRI_rc_cursor_t* cursor = TRI_ExecuteQueryAql(query, context); + if (!cursor) { + TRI_FreeContextQuery(context); + + if (tryCatch.HasCaught()) { + *err = tryCatch.Exception(); + } + else { + *err = v8::String::New("cannot execute query"); + } + + return 0; + } + + return cursor; +} + //////////////////////////////////////////////////////////////////////////////// /// @brief weak reference callback for cursors //////////////////////////////////////////////////////////////////////////////// @@ -826,7 +794,7 @@ static v8::Handle WrapCursor (TRI_rc_cursor_t* cursor) { v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); v8::Handle cursorObject = v8g->CursorTempl->NewInstance(); - map< TRI_rc_cursor_t*, v8::Persistent >::iterator i = v8g->JSCursors.find(cursor); + map< void*, v8::Persistent >::iterator i = v8g->JSCursors.find(cursor); if (i == v8g->JSCursors.end()) { v8::Persistent persistent = v8::Persistent::New(v8::External::New(cursor)); @@ -855,7 +823,7 @@ static TRI_rc_cursor_t* UnwrapCursor (v8::Handle cursorObject) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief weak reference callback for wheres +/// @brief weak reference callback for wheres - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static void WeakWhereCallback (v8::Persistent object, void* parameter) { @@ -880,7 +848,7 @@ static void WeakWhereCallback (v8::Persistent object, void* parameter } //////////////////////////////////////////////////////////////////////////////// -/// @brief stores a where clause in a javascript object +/// @brief stores a where clause in a javascript object - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static v8::Handle WrapWhere (TRI_qry_where_t* where) { @@ -889,7 +857,7 @@ static v8::Handle WrapWhere (TRI_qry_where_t* where) { v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); v8::Handle whereObject = v8g->WhereTempl->NewInstance(); - map< TRI_qry_where_t*, v8::Persistent >::iterator i = v8g->JSWheres.find(where); + map< void*, v8::Persistent >::iterator i = v8g->JSWheres.find(where); if (i == v8g->JSWheres.end()) { v8::Persistent persistent = v8::Persistent::New(v8::External::New(where)); @@ -923,484 +891,164 @@ static v8::Handle WrapWhere (TRI_qry_where_t* where) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @brief converts a query into a fluent interface representation -/// -/// @FUN{show()} -/// -/// Shows the representation of the query. -/// -/// MISSIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIING -/// -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_ShowQuery (v8::Arguments const& argv) { - v8::HandleScope scope; - - v8::Handle self = argv.Holder(); - - string result = StringifyQuery(self); - - return scope.Close(v8::String::New(result.c_str())); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief counts the number of documents in a result set -/// -/// @FUN{count()} -/// -/// The @FN{count} operator counts the number of document in the result set and -/// returns that number. The @FN{count} operator ignores any limits and returns -/// the total number of documents found. -/// -/// @verbinclude fluent24 -/// -/// @FUN{count(@LIT{true})} -/// -/// If the result set was limited by the @FN{limit} operator or documents were -/// skiped using the @FN{skip} operator, the @FN{count} operator with argument -/// @LIT{true} will use the number of elements in the final result set - after -/// applying @FN{limit} and @FN{skip}. -/// -/// @verbinclude fluent25 -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_CountQuery (v8::Arguments const& argv) { - v8::HandleScope scope; - - v8::Handle err; - TRI_result_set_t* rs = ExecuteFluentQuery(argv.Holder(), &err); - - if (rs == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (0 < argv.Length() && argv[0]->IsTrue()) { - return scope.Close(v8::Number::New(rs->count(rs, true))); - } - else { - return scope.Close(v8::Number::New(rs->count(rs, false))); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief explains how a query was executed (TO BE DELETED) -/// -/// @FUN{explain()} -/// -/// In order to optimise queries you need to know how the storage engine -/// executed that type of query. You can use the @FN{explain} operator to see -/// how a query was executed. -/// -/// @verbinclude fluent9 -/// -/// The @FN{explain} operator returns an object with the following attributes. -/// -/// - cursor: -/// describes how the result set was computed. -/// - scannedIndexEntries: -/// how many index entries were scanned -/// - scannedDocuments: -/// how many documents were scanned -/// - matchedDocuments: -/// the sum of all matched documents in each step -/// - runtime: -/// the runtime in seconds -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_ExplainQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; - v8::HandleScope scope; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - v8::Handle err; - v8::Handle self = argv.Holder(); - TRI_result_set_t* rs = ExecuteFluentQuery(self, &err); - - if (rs == 0) { - return scope.Close(v8::ThrowException(err)); - } - - v8::Handle result = v8::Object::New(); - - result->Set(v8::String::New("cursor"), v8::String::New(rs->_info._cursor)); - result->Set(v8::String::New("scannedIndexEntries"), v8::Number::New(rs->_info._scannedIndexEntries)); - result->Set(v8::String::New("scannedDocuments"), v8::Number::New(rs->_info._scannedDocuments)); - result->Set(v8::String::New("matchedDocuments"), v8::Number::New(rs->_info._matchedDocuments)); - result->Set(v8::String::New("runtime"), v8::Number::New(rs->_info._runtime)); - - v8::Handle value = self->GetInternalField(SLOT_QUERY); - - if (value != v8g->CollectionQueryType) { - TRI_fluent_query_t* query = static_cast(v8::Handle::Cast(value)->Value()); - - if (query == 0) { - return scope.Close(v8::ThrowException(v8::String::New("corrupted query"))); - } - - result->Set(v8::String::New("query"), TRI_ObjectJson(query->json(query))); - } - - return scope.Close(result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief checks for the next result document (TO BE DELETED) -/// -/// @FUN{hasNext()} -/// -/// The @FN{hasNext} operator returns @LIT{true}, then the cursor still has -/// documents. In this case the next document can be accessed using the -/// @FN{next} operator, which will advance the cursor. -/// -/// @verbinclude fluent3 -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_HasNextQuery (v8::Arguments const& argv) { - v8::HandleScope scope; - - v8::Handle err; - TRI_result_set_t* rs = ExecuteFluentQuery(argv.Holder(), &err); - - if (rs == 0) { - return scope.Close(v8::ThrowException(err)); - } - - return scope.Close(rs->hasNext(rs) ? v8::True() : v8::False()); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the next result document (TO BE DELETED) -/// -/// @FUN{next()} -/// -/// If the @FN{hasNext} operator returns @LIT{true}, then the cursor still has -/// documents. In this case the next document can be accessed using the @FN{next} -/// operator, which will advance the cursor. If you use @FN{next} on an -/// exhausted cursor, then @LIT{undefined} is returned. -/// -/// @verbinclude fluent28 -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_NextQuery (v8::Arguments const& argv) { - v8::HandleScope scope; - - v8::Handle err; - TRI_result_set_t* rs = ExecuteFluentQuery(argv.Holder(), &err); - - if (rs == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (rs->hasNext(rs)) { - TRI_doc_collection_t* collection = rs->_containerElement->_container->_collection; - TRI_shaper_t* shaper = collection->_shaper; - TRI_rs_entry_t const* entry = rs->next(rs); - - return scope.Close(TRI_ObjectRSEntry(collection, shaper, entry)); - } - else { - return scope.Close(v8::Undefined()); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the next result document reference (TO BE DELETED) -/// -/// @FUN{nextRef()} -/// -/// If the @FN{hasNext} operator returns @LIT{true}, then the cursor still has -/// documents. In this case the next document reference can be -/// accessed using the @FN{nextRef} operator, which will advance the -/// cursor. -/// -/// @verbinclude fluent51 -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_NextRefQuery (v8::Arguments const& argv) { - v8::HandleScope scope; - - v8::Handle err; - TRI_result_set_t* rs = ExecuteFluentQuery(argv.Holder(), &err); - - if (rs == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (rs->hasNext(rs)) { - TRI_doc_collection_t* collection = rs->_containerElement->_container->_collection; - TRI_rs_entry_t const* entry = rs->next(rs); - - string ref = StringUtils::itoa(collection->base._cid) + ":" + StringUtils::itoa(entry->_did); - - return scope.Close(v8::String::New(ref.c_str())); - } - else { - return scope.Close(v8::Undefined()); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a query (TO BE DELETED) -/// -/// @FUN{optimise()} -/// -/// Optimises a query. This is done automatically when executing a query. -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_OptimiseQuery (v8::Arguments const& argv) { - v8::HandleScope scope; - - v8::Handle self = argv.Holder(); - - if (self->InternalFieldCount() <= SLOT_RESULT_SET) { - return scope.Close(v8::ThrowException(v8::String::New("corrupted query"))); - } - - if (IsExecutedQuery(self)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); - } - - bool ok = OptimiseQuery(self); - - if (! ok) { - return scope.Close(v8::ThrowException(v8::String::New("corrupted query"))); - } - - return scope.Close(self); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a query and returns the result as array (TO BE DELETED) -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_ToArrayQuery (v8::Arguments const& argv) { - v8::HandleScope scope; - - v8::Handle err; - TRI_result_set_t* rs = ExecuteFluentQuery(argv.Holder(), &err); - - if (rs == 0) { - return scope.Close(v8::ThrowException(err)); - } - - return scope.Close(TRI_ArrayResultSet(rs)); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns all elements (TO BE DELETED) -/// -/// @FUN{all()} -/// -/// Selects all documents of a collection and returns a cursor. -/// -/// @verbinclude fluent23 -/// -/// The corresponding AQL query would be: -/// -/// @verbinclude fluent23-aql +/// @brief returns all elements //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_AllQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; v8::HandleScope scope; - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query + // extract the collection v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - if (opQuery == 0) { + v8::Handle err; + TRI_vocbase_col_t const* collection = LoadCollection(operand, &err); + + if (collection == 0) { return scope.Close(v8::ThrowException(err)); } + + // handle various collection types + TRI_doc_collection_t* doc = collection->_collection; - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); + if (doc->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); } - // ............................................................................. - // case: no arguments - // ............................................................................. + TRI_sim_collection_t* sim = (TRI_sim_collection_t*) doc; - if (argv.Length() == 0) { - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, opQuery->clone(opQuery)); - - return scope.Close(result); + // expecting two arguments + if (argv.Length() != 2) { + return scope.Close(v8::ThrowException(v8::String::New("usage: ALL(, )"))); } - // ............................................................................. - // error case - // ............................................................................. + TRI_voc_size_t skip = TRI_QRY_NO_SKIP; + TRI_voc_ssize_t limit = TRI_QRY_NO_LIMIT; - else { - return scope.Close(v8::ThrowException(v8::String::New("usage: all()"))); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief adds distance to a result set -/// -/// @FUN{distance()} -/// -/// Aguments the result-set of a @FN{near} or @FN{within} query with the -/// distance between the document and the given point. The distance is returned -/// in an attribute @LIT{_distance}. This is the distance in meters. -/// -/// @verbinclude fluent26 -/// -/// @FUN{distance(@FA{name})} -/// -/// Same as above, with the exception, that the distance is returned in an -/// attribute called @FA{name}. -/// -/// @verbinclude fluent27 -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_DistanceQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; - v8::HandleScope scope; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query - v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - - if (opQuery == 0) { - return scope.Close(v8::ThrowException(err)); + if (! argv[0]->IsNull()) { + skip = TRI_ObjectToDouble(argv[0]); } - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); + if (! argv[1]->IsNull()) { + limit = TRI_ObjectToDouble(argv[1]); } - // ............................................................................. - // case: no arguments - // ............................................................................. + // setup result + v8::Handle result = v8::Object::New(); - if (argv.Length() == 0) { - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateDistanceQuery(opQuery->clone(opQuery), "_distance")); - - return scope.Close(result); - } + v8::Handle documents = v8::Array::New(); + result->Set(v8::String::New("documents"), documents); // ............................................................................. - // case: + // inside a read transaction // ............................................................................. - else if (argv.Length() == 1) { - string name = TRI_ObjectToString(argv[0]); + collection->_collection->beginRead(collection->_collection); + + size_t total = sim->_primaryIndex._nrUsed; + uint32_t count = 0; - if (name.empty()) { - return scope.Close(v8::ThrowException(v8::String::New(" must be non-empty"))); + if (0 < total && 0 != limit) { + TRI_barrier_t* barrier = 0; + + // skip from the beginning + if (0 <= limit) { + void** ptr = sim->_primaryIndex._table; + void** end = sim->_primaryIndex._table + sim->_primaryIndex._nrAlloc; + + for (; ptr < end && (TRI_voc_ssize_t) count < limit; ++ptr) { + if (*ptr) { + TRI_doc_mptr_t const* d = (TRI_doc_mptr_t const*) *ptr; + + if (d->_deletion == 0) { + if (0 < skip) { + --skip; + } + else { + if (barrier == 0) { + barrier = TRI_CreateBarrierElement(&doc->_barrierList); + } + + documents->Set(count, TRI_WrapShapedJson(collection, d, barrier)); + ++count; + } + } + } + } } - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); + // skip at the end + else { + limit = -limit; - StoreFluentQuery(result, TRI_CreateDistanceQuery(opQuery->clone(opQuery), name.c_str())); + void** beg = sim->_primaryIndex._table; + void** ptr = sim->_primaryIndex._table + sim->_primaryIndex._nrAlloc - 1; - return scope.Close(result); + for (; beg <= ptr && (TRI_voc_ssize_t) count < limit; --ptr) { + if (*ptr) { + TRI_doc_mptr_t const* d = (TRI_doc_mptr_t const*) *ptr; + + if (d->_deletion == 0) { + if (0 < skip) { + --skip; + } + else { + if (barrier == 0) { + barrier = TRI_CreateBarrierElement(&doc->_barrierList); + } + + documents->Set(count, TRI_WrapShapedJson(collection, d, barrier)); + ++count; + } + } + } + } + + // swap result + if (1 < count) { + for (uint32_t i = 0, j = count - 1; i < j; ++i, --j) { + v8::Handle tmp1 = documents->Get(i); + v8::Handle tmp2 = documents->Get(j); + documents->Set(i, tmp2); + documents->Set(j, tmp1); + } + } + } } + collection->_collection->endRead(collection->_collection); + // ............................................................................. - // error case + // outside a write transaction // ............................................................................. - else { - return scope.Close(v8::ThrowException(v8::String::New("usage: distance([])"))); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up a document (TO BE DELETED) -/// -/// @FUN{document(@FA{document-identifier})} -/// -/// The @FN{document} operator finds a document given it's identifier. It returns -/// the empty result set or a result set containing the document with document -/// identifier @FA{document-identifier}. -/// -/// @verbinclude fluent54 -/// -/// The corresponding AQL query would be: -/// -/// @verbinclude fluent54-aql -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_DocumentQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; - v8::HandleScope scope; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query - v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - - if (opQuery == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); - } - - // first and only argument schould be an document idenfifier - if (argv.Length() != 1) { - return scope.Close(v8::ThrowException(v8::String::New("usage: document()"))); - } - - v8::Handle arg1 = argv[0]; - TRI_voc_cid_t cid = opQuery->_collection->_collection->base._cid; - TRI_voc_did_t did; - - if (! IsDocumentId(arg1, cid, did)) { - return scope.Close(v8::ThrowException(v8::String::New(" must be a document identifier"))); - } - - if (cid != opQuery->_collection->_collection->base._cid) { - return scope.Close(v8::ThrowException(v8::String::New("cannot execute cross collection query"))); - } - - // ............................................................................. - // create new query - // ............................................................................. - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateDocumentQuery(opQuery->clone(opQuery), did)); + result->Set(v8::String::New("total"), v8::Number::New(total)); + result->Set(v8::String::New("count"), v8::Number::New(count)); return scope.Close(result); } //////////////////////////////////////////////////////////////////////////////// -/// @brief looks up a document (TEST) +/// @brief looks up a document /// /// @FUN{document(@FA{document-identifier})} /// -/// The @FN{document} operator finds a document given it's identifier. It returns -/// the empty result set or a result set containing the document with document -/// identifier @FA{document-identifier}. +/// The @FN{document} operator finds a document given it's identifier. It +/// returns the document. Undefined is returned if the document identifier is +/// not valid. /// -/// @verbinclude fluent54 +/// Note that the returned docuement contains two pseudo-attributes, namely +/// @LIT{_id} and @LIT{_rev}. The attribute @LIT{_id} contains the document +/// reference and @LIT{_rev} contains the document revision. /// -/// The corresponding AQL query would be: +/// @EXAMPLES /// -/// @verbinclude fluent54-aql +/// @verbinclude simple1 //////////////////////////////////////////////////////////////////////////////// -static v8::Handle JS_DocumentQueryWrapped (v8::Arguments const& argv) { +static v8::Handle JS_DocumentQuery (v8::Arguments const& argv) { v8::HandleScope scope; - // extract the operand query + // extract the collection v8::Handle operand = argv.Holder(); v8::Handle err; @@ -1433,28 +1081,46 @@ static v8::Handle JS_DocumentQueryWrapped (v8::Arguments const& argv) TRI_doc_mptr_t const* document; + // ............................................................................. + // inside a read transaction + // ............................................................................. + collection->_collection->beginRead(collection->_collection); document = collection->_collection->read(collection->_collection, did); + v8::Handle result; + + if (document != 0) { + TRI_barrier_t* barrier; + + barrier = TRI_CreateBarrierElement(&collection->_collection->_barrierList); + result = TRI_WrapShapedJson(collection, document, barrier); + } collection->_collection->endRead(collection->_collection); + // ............................................................................. + // outside a write transaction + // ............................................................................. + if (document == 0) { return scope.Close(v8::ThrowException(v8::String::New("document not found"))); } - v8::Handle result = TRI_WrapShapedJson(&document->_document, collection); - return scope.Close(result); } //////////////////////////////////////////////////////////////////////////////// -/// @brief looks up all edges +/// @brief looks up all edges for a set of vertices /// -/// @FUN{@FA{edges-collection})} +/// @FUN{edges(@FA{vertices})} /// -/// The @FN{edges} operator finds all edges starting from (outbound) or -/// ending in (inbound) the current vertices. +/// The @FN{edges} operator finds all edges starting from (outbound) or ending +/// in (inbound) a document from @FA{vertices}. +/// +/// @EXAMPLES +/// +/// @verbinclude simple11 //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_EdgesQuery (v8::Arguments const& argv) { @@ -1464,500 +1130,192 @@ static v8::Handle JS_EdgesQuery (v8::Arguments const& argv) { //////////////////////////////////////////////////////////////////////////////// /// @brief looks up all inbound edges /// -/// @FUN{@FA{edges-collection})} +/// @FUN{inEdges(@FA{vertices})} /// -/// The @FN{edges} operator finds all edges starting from (outbound) -/// or ending in (inbound) the current vertices. +/// The @FN{edges} operator finds all edges ending in (inbound) a document from +/// @FA{vertices}. +/// +/// @EXAMPLES +/// +/// @verbinclude simple11 //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_InEdgesQuery (v8::Arguments const& argv) { return EdgesQuery(TRI_EDGE_IN, argv); } + //////////////////////////////////////////////////////////////////////////////// -/// @brief looks up a geo-spatial index -/// -/// @FUN{geo(@FA{location})} -/// -/// The next @FN{near} operator will use the specific geo-spatial index. -/// -/// @FUN{geo(@FA{location}, @LIT{true})} -/// -/// The next @FN{near} or @FN{within} operator will use the specific geo-spatial -/// index. -/// -/// @FUN{geo(@FA{latitiude}, @FA{longitude})} -/// -/// The next @FN{near} or @FN{within} operator will use the specific geo-spatial -/// index. -/// -/// Assume you have a location stored as list in the attribute @LIT{home} -/// and a destination stored in the attribute @LIT{work}. Than you can use the -/// @FN{geo} operator to select, which coordinates to use in a near query. -/// -/// @verbinclude fluent15 +/// @brief finds points near a given coordinate //////////////////////////////////////////////////////////////////////////////// -static v8::Handle JS_GeoQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; +static v8::Handle JS_NearQuery (v8::Arguments const& argv) { v8::HandleScope scope; - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query + // extract the collection v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - if (opQuery == 0) { + v8::Handle err; + TRI_vocbase_col_t const* collection = LoadCollection(operand, &err); + + if (collection == 0) { return scope.Close(v8::ThrowException(err)); } + + // handle various collection types + TRI_doc_collection_t* doc = collection->_collection; - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); + if (doc->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); } - // ............................................................................. - // case: - // ............................................................................. - - if (argv.Length() == 1) { - string location = TRI_ObjectToString(argv[0]); - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateGeoIndexQuery(opQuery->clone(opQuery), location.c_str(), 0, 0, false)); - - return scope.Close(result); + // expect: NEAR(, , , ) + if (argv.Length() != 4) { + return scope.Close(v8::ThrowException(v8::String::New("usage: NEAR(, , , )"))); } - // ............................................................................. - // case: , - // ............................................................................. + // extract the index + TRI_idx_iid_t iid = TRI_ObjectToDouble(argv[0]); + TRI_index_t* idx = TRI_LookupIndex(doc, iid); - else if (argv.Length() == 2 && (argv[1]->IsBoolean() || argv[1]->IsBooleanObject())) { - string location = TRI_ObjectToString(argv[0]); - bool geoJson = TRI_ObjectToBoolean(argv[1]); - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateGeoIndexQuery(opQuery->clone(opQuery), location.c_str(), 0, 0, geoJson)); - - return scope.Close(result); + if (idx == 0) { + return scope.Close(v8::ThrowException(v8::String::New("unknown index identifier"))); } - // ............................................................................. - // case: , - // ............................................................................. - - else if (argv.Length() == 2) { - string latitiude = TRI_ObjectToString(argv[0]); - string longitude = TRI_ObjectToString(argv[1]); - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateGeoIndexQuery(opQuery->clone(opQuery), 0, latitiude.c_str(), longitude.c_str(), false)); - - return scope.Close(result); + if (idx->_type != TRI_IDX_TYPE_GEO_INDEX) { + return scope.Close(v8::ThrowException(v8::String::New("index must be a geo-index"))); } - // ............................................................................. - // error case - // ............................................................................. + // extract latitiude and longitude + double latitude = TRI_ObjectToDouble(argv[1]); + double longitude = TRI_ObjectToDouble(argv[2]); - else { - return scope.Close(v8::ThrowException(v8::String::New("usage: geo(|,)"))); - } -} + // extract the limit + TRI_voc_ssize_t limit = TRI_ObjectToDouble(argv[3]); -//////////////////////////////////////////////////////////////////////////////// -/// @brief limits an existing query (TO BE DELETED) -/// -/// @FUN{limit(@FA{number})} -/// -/// Limits a result to the first @FA{number} documents. Specifying a limit of -/// @CODE{0} returns no documents at all. If you do not need a limit, just do -/// not add the limit operator. If you specifiy a negtive limit of @CODE{-n}, -/// this will return the last @CODE{n} documents instead. -/// -/// @verbinclude fluent30 -/// -/// The corresponding AQL queries would be: -/// -/// @verbinclude fluent30-aql -//////////////////////////////////////////////////////////////////////////////// + // setup result + v8::Handle result = v8::Object::New(); -static v8::Handle JS_LimitQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; - v8::HandleScope scope; + v8::Handle documents = v8::Array::New(); + result->Set(v8::String::New("documents"), documents); - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query - v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - - if (opQuery == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); - } - - // first and only argument schould be an integer - if (argv.Length() != 1) { - return scope.Close(v8::ThrowException(v8::String::New("usage: limit()"))); - } - - double limit = TRI_ObjectToDouble(argv[0]); + v8::Handle distances = v8::Array::New(); + result->Set(v8::String::New("distances"), distances); // ............................................................................. - // create new query + // inside a read transaction // ............................................................................. - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); + collection->_collection->beginRead(collection->_collection); + + GeoCoordinates* cors = TRI_NearestGeoIndex(idx, latitude, longitude, limit); - StoreFluentQuery(result, TRI_CreateLimitQuery(opQuery->clone(opQuery), (TRI_voc_ssize_t) limit)); + if (cors != 0) { + StoreGeoResult(collection, cors, documents, distances); + } + + collection->_collection->endRead(collection->_collection); + + // ............................................................................. + // outside a write transaction + // ............................................................................. return scope.Close(result); } -//////////////////////////////////////////////////////////////////////////////// -/// @brief finds points near a given coordinate -/// -/// @FUN{near(@FA{latitiude}, @FA{longitude})} -/// -/// This will find at most 100 documents near the coordinate (@FA{latitiude}, -/// @FA{longitude}). The returned list is sorted according to the distance, with -/// the nearest document coming first. -/// -/// @verbinclude fluent10 -/// -/// If you need the distance as well, then you can use -/// -/// @FUN{near(@FA{latitiude}, @FA{longitude}).distance()} -/// -/// This will add an attribute @LIT{_distance} to all documents returned, which -/// contains the distance between the given point and the document in meter. -/// -/// @verbinclude fluent11 -/// -/// @FUN{near(@FA{latitiude}, @FA{longitude}).distance(@FA{name})} -/// -/// This will add an attribute @FA{name} to all documents returned, which -/// contains the distance between the given point and the document in meter. -/// -/// @verbinclude fluent12 -/// -/// @FUN{near(@FA{latitiude}, @FA{longitude}).limit(@FA{count})} -/// -/// Limits the result to @FA{count} documents. Note that @FA{count} can be more -/// than 100. To get less or more than 100 documents with distances, use -/// -/// @FUN{near(@FA{latitiude}, @FA{longitude}).distance().limit(@FA{count})} -/// -/// This will return the first @FA{count} documents together with their -/// distances in meters. -/// -/// @verbinclude fluent13 -/// -/// If you have more then one geo-spatial index, you can use the @FN{geo} -/// operator to select a particular index. -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_NearQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; - v8::HandleScope scope; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query - v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - - if (opQuery == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); - } - - // ............................................................................. - // near(latitiude, longitude) - // ............................................................................. - - if (argv.Length() == 2) { - double latitiude = TRI_ObjectToDouble(argv[0]); - double longitude = TRI_ObjectToDouble(argv[1]); - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateNearQuery(opQuery->clone(opQuery), latitiude, longitude, NULL)); - - return scope.Close(result); - } - - // ............................................................................. - // error case - // ............................................................................. - - else { - return scope.Close(v8::ThrowException(v8::String::New("usage: near(,)"))); - } -} - //////////////////////////////////////////////////////////////////////////////// /// @brief looks up all outbound edges /// -/// @FUN{@FA{edges-collection})} +/// @FUN{outEdges(@FA{vertices})} /// -/// The @FN{edges} operator finds all edges starting from (outbound) -/// the current vertices. +/// The @FN{edges} operator finds all edges starting from (outbound) a document +/// from @FA{vertices}. +/// +/// @EXAMPLES +/// +/// @verbinclude simple13 //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_OutEdgesQuery (v8::Arguments const& argv) { return EdgesQuery(TRI_EDGE_OUT, argv); } -//////////////////////////////////////////////////////////////////////////////// -/// @brief selects elements by example -/// -/// @FUN{select()} -/// -/// The @FN{select} operator finds all documents. -/// -/// @verbinclude fluent52 -/// -/// @FUN{select(@FA{example})} -/// -/// This version selects all documents with match a given example. -/// -/// @verbinclude fluent53 -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_SelectQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; - v8::HandleScope scope; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query - v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - - if (opQuery == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); - } - - // ............................................................................. - // case: no arguments - // ............................................................................. - - if (argv.Length() == 0) { - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, opQuery->clone(opQuery)); - - return scope.Close(result); - } - - // ............................................................................. - // case: one arguments - // ............................................................................. - - if (argv.Length() == 1) { - if (! argv[0]->IsObject()) { - return scope.Close(v8::ThrowException(v8::String::New("expecting an object as "))); - } - - v8::Handle example = argv[0]->ToObject(); - v8::Handle names = example->GetOwnPropertyNames(); - size_t n = names->Length(); - - TRI_shaper_t* shaper = opQuery->_collection->_collection->_shaper; - - TRI_shape_pid_t* pids = (TRI_shape_pid_t*) TRI_Allocate(n * sizeof(TRI_shape_pid_t)); - TRI_shaped_json_t** values = (TRI_shaped_json_t**) TRI_Allocate(n * sizeof(TRI_shaped_json_t*)); - - for (size_t i = 0; i < n; ++i) { - v8::Handle key = names->Get(i); - v8::Handle val = example->Get(key); - - v8::String::Utf8Value keyStr(key); - pids[i] = shaper->findAttributePathByName(shaper, *keyStr); - values[i] = TRI_ShapedJsonV8Object(val, shaper); - - if (*keyStr == 0 || values[i] == 0) { - for (size_t j = 0; j < i; ++j) { - TRI_FreeShapedJson(values[i]); - } - - TRI_Free(values); - TRI_Free(pids); - - if (*keyStr == 0) { - return scope.Close(v8::ThrowException(v8::String::New("cannot convert attribute name to UTF8"))); - } - else if (values[i] == 0) { - return scope.Close(v8::ThrowException(v8::String::New("cannot convert value to JSON"))); - } - - assert(false); - } - } - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateSelectFullQuery(opQuery->clone(opQuery), n, pids, values)); - - return scope.Close(result); - } - - // ............................................................................. - // error case - // ............................................................................. - - else { - return scope.Close(v8::ThrowException(v8::String::New("usage: select([])"))); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief skips an existing query (TO BE DELETED) -/// -/// @FUN{skip(@FA{number})} -/// -/// Skips the first @FA{number} documents. -/// -/// @verbinclude fluent31 -/// -/// The corresponding AQL queries would be: -/// -/// @verbinclude fluent31-aql -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle JS_SkipQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; - v8::HandleScope scope; - - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query - v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - - if (opQuery == 0) { - return scope.Close(v8::ThrowException(err)); - } - - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); - } - - // first and only argument schould be an integer - if (argv.Length() != 1) { - return scope.Close(v8::ThrowException(v8::String::New("usage: skip()"))); - } - - double skip = TRI_ObjectToDouble(argv[0]); - - if (skip < 0.0) { - skip = 0.0; - } - - // ............................................................................. - // create new query - // ............................................................................. - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateSkipQuery(opQuery->clone(opQuery), (TRI_voc_size_t) skip)); - - return scope.Close(result); -} - //////////////////////////////////////////////////////////////////////////////// /// @brief finds points within a given radius -/// -/// @FUN{within(@FA{latitiude}, @FA{longitude}, @FA{radius})} -/// -/// This will find all documents with in a given radius around the coordinate -/// (@FA{latitiude}, @FA{longitude}). The returned list is unsorted. -/// -/// @verbinclude fluent32 -/// -/// If you need the distance as well, then you can use -/// -/// @FUN{within(@FA{latitiude}, @FA{longitude}, @FA{radius}).distance()} -/// -/// This will add an attribute @LIT{_distance} to all documents returned, which -/// contains the distance between the given point and the document in meter. -/// -/// @verbinclude fluent33 -/// -/// @FUN{within(@FA{latitiude}, @FA{longitude}, @FA{radius}).distance(@FA{name})} -/// -/// This will add an attribute @FA{name} to all documents returned, which -/// contains the distance between the given point and the document in meter. -/// -/// @verbinclude fluent34 -/// -/// If you have more then one geo-spatial index, you can use the @FN{geo} -/// operator to select a particular index. //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_WithinQuery (v8::Arguments const& argv) { - TRI_v8_global_t* v8g; v8::HandleScope scope; - v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - - // extract the operand query + // extract the collection v8::Handle operand = argv.Holder(); - v8::Handle err; - TRI_fluent_query_t* opQuery = ExtractFluentQuery(operand, &err); - if (opQuery == 0) { + v8::Handle err; + TRI_vocbase_col_t const* collection = LoadCollection(operand, &err); + + if (collection == 0) { return scope.Close(v8::ThrowException(err)); } + + // handle various collection types + TRI_doc_collection_t* doc = collection->_collection; - if (IsExecutedQuery(operand)) { - return scope.Close(v8::ThrowException(v8::String::New("query already executed"))); + if (doc->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); } - // ............................................................................. - // within(latitiude, longitude, radius) - // ............................................................................. - - if (argv.Length() == 3) { - double latitiude = TRI_ObjectToDouble(argv[0]); - double longitude = TRI_ObjectToDouble(argv[1]); - double radius = TRI_ObjectToDouble(argv[2]); - - v8::Handle result = v8g->FluentQueryTempl->NewInstance(); - - StoreFluentQuery(result, TRI_CreateWithinQuery(opQuery->clone(opQuery), latitiude, longitude, radius, NULL)); - - return scope.Close(result); + // expect: NEAR(, , , ) + if (argv.Length() != 4) { + return scope.Close(v8::ThrowException(v8::String::New("usage: NEAR(, , , )"))); } + // extract the index + TRI_idx_iid_t iid = TRI_ObjectToDouble(argv[0]); + TRI_index_t* idx = TRI_LookupIndex(doc, iid); + + if (idx == 0) { + return scope.Close(v8::ThrowException(v8::String::New("unknown index identifier"))); + } + + if (idx->_type != TRI_IDX_TYPE_GEO_INDEX) { + return scope.Close(v8::ThrowException(v8::String::New("index must be a geo-index"))); + } + + // extract latitiude and longitude + double latitude = TRI_ObjectToDouble(argv[1]); + double longitude = TRI_ObjectToDouble(argv[2]); + + // extract the limit + double radius = TRI_ObjectToDouble(argv[3]); + + // setup result + v8::Handle result = v8::Object::New(); + + v8::Handle documents = v8::Array::New(); + result->Set(v8::String::New("documents"), documents); + + v8::Handle distances = v8::Array::New(); + result->Set(v8::String::New("distances"), distances); + // ............................................................................. - // error case + // inside a read transaction // ............................................................................. - else { - return scope.Close(v8::ThrowException(v8::String::New("usage: within(,,)"))); + collection->_collection->beginRead(collection->_collection); + + GeoCoordinates* cors = TRI_WithinGeoIndex(idx, latitude, longitude, radius); + + if (cors != 0) { + StoreGeoResult(collection, cors, documents, distances); } + + collection->_collection->endRead(collection->_collection); + + // ............................................................................. + // outside a write transaction + // ............................................................................. + + return scope.Close(result); } //////////////////////////////////////////////////////////////////////////////// @@ -1985,7 +1343,7 @@ static v8::Handle JS_PrepareAql (v8::Arguments const& argv) { v8::HandleScope scope; if (argv.Length() != 2) { - return scope.Close(v8::ThrowException(v8::String::New("usage: AQL_PREPARE(, )"))); + return scope.Close(v8::ThrowException(v8::String::New("usage: AQL_PREPARE(, )"))); } v8::Handle dbArg = argv[0]->ToObject(); @@ -1998,47 +1356,36 @@ static v8::Handle JS_PrepareAql (v8::Arguments const& argv) { // get the query string v8::Handle queryArg = argv[1]; if (!queryArg->IsString()) { - return scope.Close(v8::ThrowException(v8::String::New("expecting string for "))); + return scope.Close(v8::ThrowException(v8::String::New("expecting string for "))); } string queryString = TRI_ObjectToString(queryArg); // create a parser object - ParserWrapper parser = ParserWrapper(queryString.c_str()); - if (!parser.parse()) { - // error object will be freed by parser destructor - ParseError *error = parser.getParseError(); - if (error) { - return scope.Close(v8::ThrowException(v8::String::New(error->getDescription().c_str()))); + TRI_query_template_t* template_ = TRI_CreateQueryTemplate(queryString.c_str(), vocbase); + if (template_) { + bool ok = TRI_ParseQueryTemplate(template_); + if (ok) { + TRI_query_instance_t* instance = TRI_CreateQueryInstance(template_); + if (instance) { + return scope.Close(WrapQueryInstance(instance)); + } + else { + TRI_FreeQueryTemplate(template_); + } + } + else { + v8::Handle errorObject = CreateQueryErrorObject(&template_->_error); + TRI_FreeQueryTemplate(template_); + return scope.Close(errorObject); } - return scope.Close(v8::ThrowException(v8::String::New("got an unknown error from the parser"))); } - - if (parser.getQueryType() == QLQueryTypeEmpty) { - return scope.Close(v8::ThrowException(v8::String::New("query is empty"))); - } - - // create the query - TRI_query_t* query = TRI_CreateQuery(vocbase, - parser.getSelect(), - parser.getWhere(), - parser.getOrder(), - parser.getJoins()); - - if (!query) { - return scope.Close(v8::ThrowException(v8::String::New("could not create query"))); - } - - query->_skip = parser.getSkip(); - query->_limit = parser.getLimit(); - - // wrap it up - return scope.Close(WrapQuery(query)); + return scope.Close(v8::ThrowException(v8::String::New("out of memory"))); } //////////////////////////////////////////////////////////////////////////////// -/// @brief constructs a new constant where clause using a boolean +/// @brief constructs a new constant where clause using a boolean - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_WhereBooleanAql (v8::Arguments const& argv) { @@ -2059,7 +1406,7 @@ static v8::Handle JS_WhereBooleanAql (v8::Arguments const& argv) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief constructs a new where clause from JavaScript +/// @brief constructs a new where clause from JavaScript - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_WhereGeneralAql (v8::Arguments const& argv) { @@ -2086,7 +1433,7 @@ static v8::Handle JS_WhereGeneralAql (v8::Arguments const& argv) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief constructs a new constant where clause for primary index +/// @brief constructs a new constant where clause for primary index - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_WherePrimaryConstAql (v8::Arguments const& argv) { @@ -2113,7 +1460,171 @@ static v8::Handle JS_WherePrimaryConstAql (v8::Arguments const& argv) } //////////////////////////////////////////////////////////////////////////////// -/// @brief constructs a new constant where clause for geo index +/// @brief constructs a new constant where clause for a hash index +//////////////////////////////////////////////////////////////////////////////// +static TRI_json_t* ConvertHelper(v8::Handle parameter) { + + if (parameter->IsBoolean()) { + v8::Handle booleanParameter = parameter->ToBoolean(); + return TRI_CreateBooleanJson(booleanParameter->Value()); + } + + if (parameter->IsNumber()) { + v8::Handle numberParameter = parameter->ToNumber(); + return TRI_CreateNumberJson(numberParameter->Value()); + } + + if (parameter->IsString()) { + v8::Handle stringParameter= parameter->ToString(); + v8::String::Utf8Value str(stringParameter); + return TRI_CreateStringCopyJson(*str); + } + + if (parameter->IsArray()) { + v8::Handle arrayParameter = v8::Handle::Cast(parameter); + TRI_json_t* listJson = TRI_CreateListJson(); + for (size_t j = 0; j < arrayParameter->Length(); ++j) { + v8::Handle item = arrayParameter->Get(j); + TRI_json_t* result = ConvertHelper(item); + TRI_PushBack2ListJson (listJson, result); + } + return listJson; + } + + return NULL; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief DEPRECATED +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_WhereHashConstAql (const v8::Arguments& argv) { + v8::HandleScope scope; + TRI_v8_global_t* v8g; + TRI_json_t* parameterList; + + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + + if (argv.Length() < 2) { + return scope.Close(v8::ThrowException(v8::String::New("usage: AQL_WHERE_HASH_CONST(, , ,..., )"))); + } + + + // .......................................................................... + // check that the first parameter sent is a double value + // .......................................................................... + bool inValidType = true; + TRI_idx_iid_t iid = TRI_ObjectToDouble(argv[0], inValidType); + + if (inValidType || iid == 0) { + return scope.Close(v8::ThrowException(v8::String::New(" must be an positive integer"))); + } + + + // .......................................................................... + // Store the index field parameters in a json object + // .......................................................................... + parameterList = TRI_CreateListJson(); + if (!parameterList) { + return scope.Close(v8::ThrowException(v8::String::New("out of memory"))); + } + + for (int j = 1; j < argv.Length(); ++j) { + v8::Handle parameter = argv[j]; + TRI_json_t* jsonParameter = ConvertHelper(parameter); + if (jsonParameter == NULL) { // NOT the null json value! + return scope.Close(v8::ThrowException(v8::String::New("type value not currently supported for hash index"))); + } + TRI_PushBackListJson(parameterList, jsonParameter); + + /* + if (parameter->IsBoolean() ) { + v8::Handle booleanParameter = parameter->ToBoolean(); + TRI_PushBackListJson(parameterList, TRI_CreateBooleanJson(booleanParameter->Value() )); + } + else if ( parameter->IsNumber() ) { + v8::Handle numberParameter = parameter->ToNumber(); + TRI_PushBackListJson(parameterList, TRI_CreateNumberJson(numberParameter->Value() )); + } + else if ( parameter->IsString() ) { + v8::Handle stringParameter= parameter->ToString(); + v8::String::Utf8Value str(stringParameter); + TRI_PushBackListJson(parameterList, TRI_CreateStringCopyJson(*str)); + } + else if ( parameter->IsArray() ) { + v8::Handle arrayParameter = v8::Handle(v8::Array::Cast(*parameter)); + } + else { + return scope.Close(v8::ThrowException(v8::String::New("type value not currently supported for hash index"))); + } + */ + } + + + // build document hash access + TRI_qry_where_t* where = TRI_CreateQueryWhereHashConstant(iid, parameterList); + + // wrap it up + return scope.Close(WrapWhere(where)); + +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief DEPRECATED +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_WhereSkiplistConstAql (const v8::Arguments& argv) { + v8::HandleScope scope; + TRI_v8_global_t* v8g; + TRI_json_t* parameterList; + + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + + if (argv.Length() < 2) { + return scope.Close(v8::ThrowException(v8::String::New("usage: AQL_WHERE_SL_CONST(, , ,..., )"))); + } + + + // .......................................................................... + // check that the first parameter sent is a double value + // .......................................................................... + bool inValidType = true; + TRI_idx_iid_t iid = TRI_ObjectToDouble(argv[0], inValidType); + + if (inValidType || iid == 0) { + return scope.Close(v8::ThrowException(v8::String::New(" must be an positive integer"))); + } + + + // .......................................................................... + // Store the index field parameters in a json object + // .......................................................................... + parameterList = TRI_CreateListJson(); + if (!parameterList) { + return scope.Close(v8::ThrowException(v8::String::New("out of memory"))); + } + + for (int j = 1; j < argv.Length(); ++j) { + v8::Handle parameter = argv[j]; + TRI_json_t* jsonParameter = ConvertHelper(parameter); + if (jsonParameter == NULL) { // NOT the null json value! + return scope.Close(v8::ThrowException(v8::String::New("type value not currently supported for skiplist index"))); + } + TRI_PushBackListJson(parameterList, jsonParameter); + } + + + // build where + TRI_qry_where_t* where = TRI_CreateQueryWhereSkiplistConstant(iid, parameterList); + + // wrap it up + return scope.Close(WrapWhere(where)); + +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs a new constant where clause for geo index - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_WhereWithinConstAql (v8::Arguments const& argv) { @@ -2155,7 +1666,121 @@ static v8::Handle JS_WhereWithinConstAql (v8::Arguments const& argv) } //////////////////////////////////////////////////////////////////////////////// -/// @brief constructs a new query from given parts +/// @brief constructs a new query from given parts - DEPRECATED +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_HashSelectAql (v8::Arguments const& argv) { + v8::HandleScope scope; + + if (argv.Length() != 2) { + return scope.Close(v8::ThrowException(v8::String::New("usage: AQL_SELECT(collection, where)"))); + } + + // ........................................................................... + // extract the primary collection + // ........................................................................... + v8::Handle collectionArg = argv[0]; + if (! collectionArg->IsObject()) { + return scope.Close(v8::ThrowException(v8::String::New("expecting a COLLECTION as second argument"))); + } + v8::Handle collectionObj = collectionArg->ToObject(); + v8::Handle err; + const TRI_vocbase_col_t* collection = LoadCollection(collectionObj, &err); + if (collection == 0) { + return scope.Close(v8::ThrowException(err)); + } + + + // ........................................................................... + // Extract there hash where clause + // ........................................................................... + v8::Handle whereArg = argv[1]; + TRI_qry_where_t* where = 0; + if (whereArg->IsNull()) { + return scope.Close(v8::ThrowException(v8::String::New("expecting a WHERE object as third argument"))); + } + v8::Handle whereObj = whereArg->ToObject(); + where = UnwrapClass(whereObj, WRP_QRY_WHERE_TYPE); + if (where == 0) { + return scope.Close(v8::ThrowException(v8::String::New("corrupted WHERE"))); + } + + + // ........................................................................... + // Create the hash query + // ........................................................................... + TRI_query_t* query = TRI_CreateHashQuery(where, collection->_collection); + if (!query) { + return scope.Close(v8::ThrowException(v8::String::New("could not create query object"))); + } + + + // ........................................................................... + // wrap it up + // ........................................................................... + return scope.Close(WrapQuery(query)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs a new query from given parts - DEPRECATED +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_SkiplistSelectAql (v8::Arguments const& argv) { + v8::HandleScope scope; + + if (argv.Length() != 2) { + return scope.Close(v8::ThrowException(v8::String::New("usage: AQL_SL_SELECT(collection, where)"))); + } + + // ........................................................................... + // extract the primary collection + // ........................................................................... + v8::Handle collectionArg = argv[0]; + if (! collectionArg->IsObject()) { + return scope.Close(v8::ThrowException(v8::String::New("expecting a COLLECTION as second argument"))); + } + v8::Handle collectionObj = collectionArg->ToObject(); + v8::Handle err; + const TRI_vocbase_col_t* collection = LoadCollection(collectionObj, &err); + if (collection == 0) { + return scope.Close(v8::ThrowException(err)); + } + + + // ........................................................................... + // Extract the where clause + // ........................................................................... + v8::Handle whereArg = argv[1]; + TRI_qry_where_t* where = 0; + if (whereArg->IsNull()) { + return scope.Close(v8::ThrowException(v8::String::New("expecting a WHERE object as third argument"))); + } + v8::Handle whereObj = whereArg->ToObject(); + where = UnwrapClass(whereObj, WRP_QRY_WHERE_TYPE); + if (where == 0) { + return scope.Close(v8::ThrowException(v8::String::New("corrupted WHERE"))); + } + + + // ........................................................................... + // Create the skiplist query + // ........................................................................... + TRI_query_t* query = TRI_CreateSkiplistQuery(where, collection->_collection); + if (!query) { + return scope.Close(v8::ThrowException(v8::String::New("could not create query object"))); + } + + + // ........................................................................... + // wrap it up + // ........................................................................... + return scope.Close(WrapQuery(query)); + +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes a select query - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_SelectAql (v8::Arguments const& argv) { @@ -2222,30 +1847,34 @@ static v8::Handle JS_SelectAql (v8::Arguments const& argv) { return scope.Close(v8::ThrowException(v8::String::New("could not create join struct"))); } - TRI_AddPartSelectJoin(join, JOIN_TYPE_PRIMARY, NULL, - (char*) name.c_str(), (char*) "alias"); + TRI_AddPartSelectJoin(join, + JOIN_TYPE_PRIMARY, + NULL, + NULL, + (char*) name.c_str(), + (char*) "alias", + NULL); // create the query TRI_query_t* query = TRI_CreateQuery(vocbase, select, NULL, NULL, - join); + join, + skip, + limit); if (!query) { select->free(select); return scope.Close(v8::ThrowException(v8::String::New("could not create query object"))); } - query->_skip = skip; - query->_limit = limit; - // wrap it up return scope.Close(WrapQuery(query)); } //////////////////////////////////////////////////////////////////////////////// -/// @brief executes a query +/// @brief executes a query - DEPRECATED //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_ExecuteAql (v8::Arguments const& argv) { @@ -2261,6 +1890,23 @@ static v8::Handle JS_ExecuteAql (v8::Arguments const& argv) { return scope.Close(WrapCursor(cursor)); } +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes a query instance +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_ExecuteQueryInstance (v8::Arguments const& argv) { + v8::HandleScope scope; + + v8::Handle err; + TRI_rc_cursor_t* cursor = ExecuteQueryInstance(argv.Holder(), &err); + + if (cursor == 0) { + return v8::ThrowException(err); + } + + return scope.Close(WrapCursor(cursor)); +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -2282,6 +1928,26 @@ static v8::Handle JS_ExecuteAql (v8::Arguments const& argv) { /// @brief returns the next document //////////////////////////////////////////////////////////////////////////////// +static v8::Handle JS_CountCursor (v8::Arguments const& argv) { + v8::HandleScope scope; + v8::TryCatch tryCatch; + + if (argv.Length() != 0) { + return scope.Close(v8::ThrowException(v8::String::New("usage: count()"))); + } + + v8::Handle self = argv.Holder(); + TRI_rc_cursor_t* cursor = UnwrapCursor(self); + + if (cursor == 0) { + return scope.Close(v8::ThrowException(v8::String::New("corrupted cursor"))); + } + + + return scope.Close(v8::Number::New(cursor->_matchedDocuments)); + +} + static v8::Handle JS_NextCursor (v8::Arguments const& argv) { v8::HandleScope scope; v8::TryCatch tryCatch; @@ -2426,23 +2092,6 @@ static v8::Handle JS_HasNextCursor (v8::Arguments const& argv) { //////////////////////////////////////////////////////////////////////////////// /// @brief counts the number of documents in a result set -/// -/// @FUN{count()} -/// -/// The @FN{count} operator counts the number of document in the result set and -/// returns that number. The @FN{count} operator ignores any limits and returns -/// the total number of documents found. -/// -/// @verbinclude fluent24 -/// -/// @FUN{count(@LIT{true})} -/// -/// If the result set was limited by the @FN{limit} operator or documents were -/// skiped using the @FN{skip} operator, the @FN{count} operator with argument -/// @LIT{true} will use the number of elements in the final result set - after -/// applying @FN{limit} and @FN{skip}. -/// -/// @verbinclude fluent25 //////////////////////////////////////////////////////////////////////////////// static v8::Handle JS_CountVocbaseCol (v8::Arguments const& argv) { @@ -2688,6 +2337,654 @@ static v8::Handle JS_EnsureGeoIndexVocbaseCol (v8::Arguments const& a return scope.Close(v8::Number::New(iid)); } +//////////////////////////////////////////////////////////////////////////////// +/// @brief ensures that a hash index exists +/// +/// @FUN{ensureHashIndex(@FA{field1}, @FA{field2}, ...,@FA{fieldn})} +/// +/// Creates a hash index on all documents using attributes as paths to the +/// fields. At least one attribute must be given. The value of this attribute +/// must be a list. All documents, which do not have the attribute path or with +/// ore or more values that are not suitable, are ignored. +/// +/// In case that the index was successfully created, the index indetifier +/// is returned. +/// +/// @verbinclude fluent14 +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_EnsureHashIndexVocbaseCol (v8::Arguments const& argv) { + v8::HandleScope scope; + v8::Handle err; + + // ............................................................................. + // Check that we have a valid collection + // ............................................................................. + + TRI_vocbase_col_t const* col = LoadCollection(argv.Holder(), &err); + + if (col == 0) { + return scope.Close(v8::ThrowException(err)); + } + + // ............................................................................. + // Check collection type + // ............................................................................. + + TRI_doc_collection_t* collection = col->_collection; + + if (collection->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); + } + + TRI_sim_collection_t* sim = (TRI_sim_collection_t*) collection; + + // ............................................................................. + // Ensure that there is at least one string parameter sent to this method + // ............................................................................. + + if (argv.Length() == 0) { + return scope.Close(v8::ThrowException(v8::String::New("one or more string parameters required for the ensureHashIndex(...) command"))); + } + + // ............................................................................. + // The index id which will either be an existing one or a newly created + // hash index. + // ............................................................................. + + TRI_idx_iid_t iid = 0; + + // ............................................................................. + // Return string when there is an error of some sort. + // ............................................................................. + + string errorString; + + // ............................................................................. + // Create a list of paths, these will be used to create a list of shapes + // which will be used by the hash index. + // ............................................................................. + + TRI_vector_t attributes; + TRI_InitVector(&attributes,sizeof(char*)); + + bool ok = true; + + for (int j = 0; j < argv.Length(); ++j) { + v8::Handle argument = argv[j]; + + if (! argument->IsString() ) { + errorString = "invalid parameter passed to ensureHashIndex(...) command"; + ok = false; + break; + } + + // ........................................................................... + // convert the argument into a "C" string + // ........................................................................... + + v8::String::Utf8Value argumentString(argument); + char* cArgument = *argumentString == 0 ? 0 : TRI_DuplicateString(*argumentString); + + if (cArgument == NULL) { + errorString = "insuffient memory to complete ensureHashIndex(...) command"; + ok = false; + break; + } + + TRI_PushBackVector(&attributes,&cArgument); + } + + // ............................................................................. + // Check that each parameter is unique + // ............................................................................. + + for (size_t j = 0; j < attributes._length; ++j) { + char* left = *((char**) (TRI_AtVector(&attributes, j))); + + for (size_t k = j + 1; k < attributes._length; ++k) { + char* right = *((char**) (TRI_AtVector(&attributes, k))); + + if (TRI_EqualString(left, right)) { + errorString = "duplicate parameters sent to ensureHashIndex(...) command"; + ok = false; + break; + } + } + } + + // ............................................................................. + // Some sort of error occurred -- display error message and abort index creation + // (or index retrieval). + // ............................................................................. + + if (!ok) { + + // Remove the memory allocated to the list of attributes used for the hash index + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + + TRI_DestroyVector(&attributes); + return scope.Close(v8::ThrowException(v8::String::New(errorString.c_str(), errorString.length()))); + } + + // ............................................................................. + // Actually create the index here + // ............................................................................. + + iid = TRI_EnsureHashIndexSimCollection(sim, &attributes, true); + + // ............................................................................. + // Remove the memory allocated to the list of attributes used for the hash index + // ............................................................................. + + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + + TRI_DestroyVector(&attributes); + + if (iid == 0) { + return scope.Close(v8::ThrowException(v8::String::New("hash index could not be created"))); + } + + // ............................................................................. + // Return the newly assigned index identifier + // ............................................................................. + + return scope.Close(v8::Number::New(iid)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ensures that a hash index exists +/// +/// @FUN{ensureMutliHashIndex(@FA{field1}, @FA{field2}, ...,@FA{fieldn})} +/// +/// Creates a non-unique hash index on all documents using attributes as paths +/// to the fields. At least one attribute must be given. All documents, which do +/// not have the attribute path or with one or more values that are not +/// suitable, are ignored. +/// +/// In case that the index was successfully created, the index indetifier +/// is returned. +/// +/// @verbinclude fluent14 +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_EnsureMultiHashIndexVocbaseCol (v8::Arguments const& argv) { + v8::HandleScope scope; + v8::Handle err; + + // ............................................................................. + // Check that we have a valid collection + // ............................................................................. + + TRI_vocbase_col_t const* col = LoadCollection(argv.Holder(), &err); + + if (col == 0) { + return scope.Close(v8::ThrowException(err)); + } + + // ............................................................................. + // Check collection type + // ............................................................................. + + TRI_doc_collection_t* collection = col->_collection; + + if (collection->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); + } + + TRI_sim_collection_t* sim = (TRI_sim_collection_t*) collection; + + // ............................................................................. + // Ensure that there is at least one string parameter sent to this method + // ............................................................................. + + if (argv.Length() == 0) { + return scope.Close(v8::ThrowException(v8::String::New("one or more string parameters required for the ensureHashIndex(...) command"))); + } + + // ............................................................................. + // The index id which will either be an existing one or a newly created + // hash index. + // ............................................................................. + + TRI_idx_iid_t iid = 0; + + // ............................................................................. + // Return string when there is an error of some sort. + // ............................................................................. + + string errorString; + + // ............................................................................. + // Create a list of paths, these will be used to create a list of shapes + // which will be used by the hash index. + // ............................................................................. + + TRI_vector_t attributes; + TRI_InitVector(&attributes,sizeof(char*)); + + bool ok = true; + + for (int j = 0; j < argv.Length(); ++j) { + v8::Handle argument = argv[j]; + + if (! argument->IsString() ) { + errorString = "invalid parameter passed to ensureMultiHashIndex(...) command"; + ok = false; + break; + } + + // ........................................................................... + // convert the argument into a "C" string + // ........................................................................... + + v8::String::Utf8Value argumentString(argument); + char* cArgument = *argumentString == 0 ? 0 : TRI_DuplicateString(*argumentString); + + if (cArgument == NULL) { + errorString = "insuffient memory to complete ensureMultiHashIndex(...) command"; + ok = false; + break; + } + + TRI_PushBackVector(&attributes,&cArgument); + } + + // ............................................................................. + // Check that each parameter is unique + // ............................................................................. + + for (size_t j = 0; j < attributes._length; ++j) { + char* left = *((char**) (TRI_AtVector(&attributes, j))); + + for (size_t k = j + 1; k < attributes._length; ++k) { + char* right = *((char**) (TRI_AtVector(&attributes, k))); + + if (TRI_EqualString(left,right)) { + errorString = "duplicate parameters sent to ensureMultiHashIndex(...) command"; + ok = false; + break; + } + } + } + + // ............................................................................. + // Some sort of error occurred -- display error message and abort index creation + // (or index retrieval). + // ............................................................................. + + if (!ok) { + + // Remove the memory allocated to the list of attributes used for the hash index + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + + TRI_DestroyVector(&attributes); + return scope.Close(v8::ThrowException(v8::String::New(errorString.c_str(), errorString.length()))); + } + + // ............................................................................. + // Actually create the index here + // ............................................................................. + + iid = TRI_EnsureHashIndexSimCollection(sim, &attributes, false); + + // ............................................................................. + // Remove the memory allocated to the list of attributes used for the hash index + // ............................................................................. + + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + + TRI_DestroyVector(&attributes); + + if (iid == 0) { + return scope.Close(v8::ThrowException(v8::String::New("non-unique hash index could not be created"))); + } + + // ............................................................................. + // Return the newly assigned index identifier + // ............................................................................. + + return scope.Close(v8::Number::New(iid)); +} + + + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ensures that a skiplist index exists +/// +/// @FUN{ensureSLIndex(@FA{field1}, @FA{field2}, ...,@FA{fieldn})} +/// +/// Creates a skiplist index on all documents using attributes as paths to +/// the fields. At least one attribute must be given. +/// All documents, which do not have the attribute path or +/// with ore or more values that are not suitable, are ignored. +/// +/// In case that the index was successfully created, the index indetifier +/// is returned. +/// +/// @verbinclude fluent14 +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_EnsureSkiplistIndexVocbaseCol (v8::Arguments const& argv) { + + v8::HandleScope scope; + v8::Handle err; + + + // ............................................................................. + // Check that we have a valid collection + // ............................................................................. + TRI_vocbase_col_t const* col = LoadCollection(argv.Holder(), &err); + + if (col == 0) { + return scope.Close(v8::ThrowException(err)); + } + + + // ............................................................................. + // Check collection type + // ............................................................................. + TRI_doc_collection_t* collection = col->_collection; + + if (collection->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); + } + TRI_sim_collection_t* sim = (TRI_sim_collection_t*) collection; + + + // ............................................................................. + // Return string when there is an error of some sort. + // ............................................................................. + string errorString; + + + // ............................................................................. + // Ensure that there is at least one string parameter sent to this method + // ............................................................................. + if (argv.Length() == 0) { + errorString = "one or more string parameters required for the ensureSLIndex(...) command"; + return scope.Close(v8::String::New(errorString.c_str(),errorString.length())); + } + + + // ............................................................................. + // The index id which will either be an existing one or a newly created + // hash index. + // ............................................................................. + TRI_idx_iid_t iid = 0; + + + // ............................................................................. + // Create a list of paths, these will be used to create a list of shapes + // which will be used by the hash index. + // ............................................................................. + + TRI_vector_t attributes; + TRI_InitVector(&attributes,sizeof(char*)); + + bool ok = true; + + for (int j = 0; j < argv.Length(); ++j) { + + v8::Handle argument = argv[j]; + if (! argument->IsString() ) { + errorString = "invalid parameter passed to ensureSLIndex(...) command"; + ok = false; + break; + } + + // ........................................................................... + // convert the argument into a "C" string + // ........................................................................... + + v8::String::Utf8Value argumentString(argument); + char* cArgument = (char*) (TRI_Allocate(argumentString.length() + 1)); + if (cArgument == NULL) { + errorString = "insuffient memory to complete ensureSLIndex(...) command"; + ok = false; + break; + } + + memcpy(cArgument, *argumentString, argumentString.length()); + TRI_PushBackVector(&attributes,&cArgument); + } + + + // ............................................................................. + // Check that each parameter is unique + // ............................................................................. + + for (size_t j = 0; j < attributes._length; ++j) { + char* left = *((char**) (TRI_AtVector(&attributes, j))); + for (size_t k = j + 1; k < attributes._length; ++k) { + char* right = *((char**) (TRI_AtVector(&attributes, k))); + if (strcmp(left,right) == 0) { + errorString = "duplicate parameters sent to ensureSLIndex(...) command"; + //printf("%s:%s:%u:%s:%s\n",__FILE__,__FUNCTION__,__LINE__,left,right); + ok = false; + break; + } + } + } + + + // ............................................................................. + // Some sort of error occurred -- display error message and abort index creation + // (or index retrieval). + // ............................................................................. + + if (!ok) { + // ........................................................................... + // Remove the memory allocated to the list of attributes used for the hash index + // ........................................................................... + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + TRI_DestroyVector(&attributes); + return scope.Close(v8::String::New(errorString.c_str(),errorString.length())); + } + + + // ............................................................................. + // Actually create the index here + // ............................................................................. + iid = TRI_EnsureSkiplistIndexSimCollection(sim, &attributes, true); + + // ............................................................................. + // Remove the memory allocated to the list of attributes used for the hash index + // ............................................................................. + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + TRI_DestroyVector(&attributes); + + if (iid == 0) { + return scope.Close(v8::String::New("skiplist index could not be created")); + } + + // ............................................................................. + // Return the newly assigned index identifier + // ............................................................................. + return scope.Close(v8::Number::New(iid)); +} + + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ensures that a multi skiplist index exists +/// +/// @FUN{ensureMultiSLIndex(@FA{field1}, @FA{field2}, ...,@FA{fieldn})} +/// +/// Creates a multi skiplist index on all documents using attributes as paths to +/// the fields. At least one attribute must be given. +/// All documents, which do not have the attribute path or +/// with ore or more values that are not suitable, are ignored. +/// +/// In case that the index was successfully created, the index indetifier +/// is returned. +/// +/// @verbinclude fluent14 +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle JS_EnsureMultiSkiplistIndexVocbaseCol (v8::Arguments const& argv) { + + v8::HandleScope scope; + v8::Handle err; + + + // ............................................................................. + // Check that we have a valid collection + // ............................................................................. + TRI_vocbase_col_t const* col = LoadCollection(argv.Holder(), &err); + + if (col == 0) { + return scope.Close(v8::ThrowException(err)); + } + + + // ............................................................................. + // Check collection type + // ............................................................................. + TRI_doc_collection_t* collection = col->_collection; + + if (collection->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return scope.Close(v8::ThrowException(v8::String::New("unknown collection type"))); + } + TRI_sim_collection_t* sim = (TRI_sim_collection_t*) collection; + + + // ............................................................................. + // Return string when there is an error of some sort. + // ............................................................................. + string errorString; + + + // ............................................................................. + // Ensure that there is at least one string parameter sent to this method + // ............................................................................. + if (argv.Length() == 0) { + errorString = "one or more string parameters required for the ensureMutliSLIndex(...) command"; + return scope.Close(v8::String::New(errorString.c_str(),errorString.length())); + } + + + // ............................................................................. + // The index id which will either be an existing one or a newly created + // hash index. + // ............................................................................. + TRI_idx_iid_t iid = 0; + + + // ............................................................................. + // Create a list of paths, these will be used to create a list of shapes + // which will be used by the hash index. + // ............................................................................. + + TRI_vector_t attributes; + TRI_InitVector(&attributes,sizeof(char*)); + + bool ok = true; + + for (int j = 0; j < argv.Length(); ++j) { + + v8::Handle argument = argv[j]; + if (! argument->IsString() ) { + errorString = "invalid parameter passed to ensureMultiSLIndex(...) command"; + ok = false; + break; + } + + // ........................................................................... + // convert the argument into a "C" string + // ........................................................................... + + v8::String::Utf8Value argumentString(argument); + char* cArgument = (char*) (TRI_Allocate(argumentString.length() + 1)); + if (cArgument == NULL) { + errorString = "insuffient memory to complete ensureMultiSLIndex(...) command"; + ok = false; + break; + } + + memcpy(cArgument, *argumentString, argumentString.length()); + TRI_PushBackVector(&attributes,&cArgument); + } + + + // ............................................................................. + // Check that each parameter is unique + // ............................................................................. + + for (size_t j = 0; j < attributes._length; ++j) { + char* left = *((char**) (TRI_AtVector(&attributes, j))); + for (size_t k = j + 1; k < attributes._length; ++k) { + char* right = *((char**) (TRI_AtVector(&attributes, k))); + if (strcmp(left,right) == 0) { + errorString = "duplicate parameters sent to ensureMultiSLIndex(...) command"; + ok = false; + break; + } + } + } + + + // ............................................................................. + // Some sort of error occurred -- display error message and abort index creation + // (or index retrieval). + // ............................................................................. + + if (!ok) { + // ........................................................................... + // Remove the memory allocated to the list of attributes used for the hash index + // ........................................................................... + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + TRI_DestroyVector(&attributes); + return scope.Close(v8::String::New(errorString.c_str(),errorString.length())); + } + + + // ............................................................................. + // Actually create the index here + // ............................................................................. + iid = TRI_EnsureSkiplistIndexSimCollection(sim, &attributes, false); + + // ............................................................................. + // Remove the memory allocated to the list of attributes used for the hash index + // ............................................................................. + for (size_t j = 0; j < attributes._length; ++j) { + char* cArgument = *((char**) (TRI_AtVector(&attributes, j))); + TRI_Free(cArgument); + } + TRI_DestroyVector(&attributes); + + if (iid == 0) { + return scope.Close(v8::String::New("multi skiplist index could not be created")); + } + + // ............................................................................. + // Return the newly assigned index identifier + // ............................................................................. + return scope.Close(v8::Number::New(iid)); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief returns the figures of a collection //////////////////////////////////////////////////////////////////////////////// @@ -2745,6 +3042,7 @@ static v8::Handle JS_GetIndexesVocbaseCol (v8::Arguments const& argv) v8::Handle err; TRI_vocbase_col_t const* col = LoadCollection(argv.Holder(), &err); + if (col == 0) { return scope.Close(v8::ThrowException(err)); } @@ -3278,9 +3576,7 @@ static v8::Handle MapGetVocBase (v8::Local name, if ( key == "toString" || key == "toJSON" - || key == "hasOwnProperties" - || key == "COMPLETIONS" - || key == "PRINT" + || key == "hasOwnProperty" || key[0] == '_') { return v8::Handle(); } @@ -3321,7 +3617,7 @@ static v8::Handle JS_CollectionsVocBase (v8::Arguments const& argv) { v8::HandleScope scope; TRI_vocbase_t* vocbase = UnwrapClass(argv.Holder(), WRP_VOCBASE_TYPE); - + if (vocbase == 0) { return scope.Close(v8::ThrowException(v8::String::New("corrupted vocbase"))); } @@ -3407,9 +3703,7 @@ static v8::Handle MapGetEdges (v8::Local name, if ( key == "toString" || key == "toJSON" - || key == "hasOwnProperties" - || key == "COMPLETIONS" - || key == "PRINT" + || key == "hasOwnProperty" || key[0] == '_') { return v8::Handle(); } @@ -3425,195 +3719,6 @@ static v8::Handle MapGetEdges (v8::Local name, return scope.Close(TRI_WrapEdgesCollection(collection)); } -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup ShapedJSON -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief selects a attribute from the shaped json -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle MapWrappedShapedJson (v8::Local name, - const v8::AccessorInfo& info) { - v8::HandleScope scope; - - // get shaped json - TRI_shaped_json_t* document = UnwrapClass(info.Holder(), WRP_SHAPED_JSON_TYPE); - if (document == 0) { - return scope.Close(v8::ThrowException(v8::String::New("corrupted shaped json"))); - } - - // convert the JavaScript string to a string - string key = TRI_ObjectToString(name); - - - if (key == "") { - return scope.Close(v8::ThrowException(v8::String::New("name must not be empty"))); - } - - if (key == "toString" || key == "toJSON" || key == "PRINT" || key[0] == '_') { - return v8::Handle(); - } - - if (key == "valueOf") { - return v8::Handle(v8::String::New("")); - } - - // get collection - if (info.Holder()->InternalFieldCount() < SLOT_QUERY) { - return scope.Close(v8::ThrowException(v8::String::New("missing collection"))); - } - TRI_vocbase_col_t* collection = static_cast(v8::Handle::Cast(info.Holder()->GetInternalField(SLOT_QUERY))->Value()); - if (collection == 0) { - return scope.Close(v8::ThrowException(v8::String::New("corrupted shaped json"))); - } - - // get shape accessor - TRI_shaper_t* shaper = collection->_collection->_shaper; - TRI_shape_pid_t pid = shaper->findAttributePathByName(shaper, key.c_str()); - TRI_shape_sid_t sid = document->_sid; - TRI_shape_access_t* acc = TRI_ShapeAccessor(shaper, sid, pid); - - if (acc == NULL || acc->_shape == NULL) { - return scope.Close(v8::ThrowException(v8::String::New("key not found"))); - } - - TRI_shape_t const* shape = acc->_shape; - -// if (acc->_shape->_sid != shaper->_sidNumber) { -// return scope.Close(v8::ThrowException(v8::String::New("error in sid"))); -// } - - // convert to v8 value - TRI_shaped_json_t json; - if (TRI_ExecuteShapeAccessor(acc, document, &json)) { - return scope.Close(TRI_JsonShapeData(shaper, shape, json._data.data, json._data.length)); - } - - return scope.Close(v8::ThrowException(v8::String::New("error"))); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief selects the keys from the shaped json -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle KeysOfShapedJson (const v8::AccessorInfo& info) { - v8::HandleScope scope; - v8::Handle result = v8::Array::New(); - - // get shaped json - TRI_shaped_json_t* document = UnwrapClass(info.Holder(), WRP_SHAPED_JSON_TYPE); - if (document == 0) { - return scope.Close(result); - } - - // get collection - if (info.Holder()->InternalFieldCount() < SLOT_QUERY) { - return scope.Close(result); - } - TRI_vocbase_col_t* collection = static_cast(v8::Handle::Cast(info.Holder()->GetInternalField(SLOT_QUERY))->Value()); - if (collection == 0) { - return scope.Close(result); - } - - - TRI_shaper_t* shaper = collection->_collection->_shaper; - TRI_shape_t const* shape = shaper->lookupShapeId(shaper, document->_sid); - - // check for array shape - if (shape == 0 || shape->_type != TRI_SHAPE_ARRAY) { - return scope.Close(result); - } - - TRI_array_shape_t const* s; - TRI_shape_aid_t const* aids; - TRI_shape_size_t i; - TRI_shape_size_t n; - char const* qtr = 0; - uint32_t count = 0; - - // shape is an array - s = (TRI_array_shape_t const*) shape; - - // number of entries - n = s->_fixedEntries + s->_variableEntries; - - // calculation position of attribute ids - qtr = (char const*) shape; - qtr += sizeof(TRI_array_shape_t); - qtr += n * sizeof(TRI_shape_sid_t); - aids = (TRI_shape_aid_t const*) qtr; - - for (i = 0; i < n; ++i, ++aids) { - char const* att = shaper->lookupAttributeId(shaper, *aids); - if (att) result->Set(count++, v8::String::New(att)); - } - - return scope.Close(result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief check if a property is present and if present, get its attributes. -//////////////////////////////////////////////////////////////////////////////// - -static v8::Handle PropertyQueryShapedJson (v8::Local name, const v8::AccessorInfo& info) { - v8::HandleScope scope; - - // get shaped json - TRI_shaped_json_t* document = UnwrapClass(info.Holder(), WRP_SHAPED_JSON_TYPE); - if (document == 0) { - return scope.Close(v8::Handle()); - } - - // convert the JavaScript string to a string - string key = TRI_ObjectToString(name); - - - if (key == "") { - return scope.Close(v8::Handle()); - } - - // get collection - if (info.Holder()->InternalFieldCount() < SLOT_QUERY) { - return scope.Close(v8::Handle(v8::Integer::New(v8::None))); - } - TRI_vocbase_col_t* collection = static_cast(v8::Handle::Cast(info.Holder()->GetInternalField(SLOT_QUERY))->Value()); - if (collection == 0) { - return scope.Close(v8::Handle()); - } - - // get shape accessor - TRI_shaper_t* shaper = collection->_collection->_shaper; - TRI_shape_pid_t pid = shaper->findAttributePathByName(shaper, key.c_str()); - TRI_shape_sid_t sid = document->_sid; - TRI_shape_access_t* acc = TRI_ShapeAccessor(shaper, sid, pid); - - if (acc == NULL || acc->_shape == NULL) { - // key not found - return scope.Close(v8::Handle()); - } - - return scope.Close(v8::Handle(v8::Integer::New(1))); - -// -// TRI_shape_t const* shape = acc->_shape; -// -// TRI_shaped_json_t json; -// if (TRI_ExecuteShapeAccessor(acc, document, &json)) { -// return scope.Close(v8::Handle(v8::Integer::New(1))); -// } -// -// // error -// return scope.Close(v8::Handle()); -} - - - //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -3659,157 +3764,231 @@ static v8::Handle JS_CollectionsEdges (v8::Arguments const& argv) { //////////////////////////////////////////////////////////////////////////////// // ----------------------------------------------------------------------------- -// --SECTION-- MODULE +// --SECTION-- SHAPED JSON FUNCTIONS +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @page JavaScriptFuncIndex JavaScript Function Index -/// -/// @section JSFDatabaseSelection Database Selection -/// -/// - @ref MapGetVocBase "db".@FA{database} -/// -/// - @ref MapGetVocBase "edges".@FA{database} -/// -/// @section JSFDatabases Database Functions -/// -/// - @ref JS_ParameterVocbaseCol "parameter" -/// -/// @subsection JSFDocument Database Document Functions -/// -/// - @ref JS_DeleteVocbaseCol "delete" -/// - @ref JS_ReplaceVocbaseCol "replace" -/// - @ref JS_SaveVocbaseCol "save" -/// - @ref JS_SaveEdgesCol "save" for edges -/// -/// @subsection JSFIndex Database Index Functions -/// -/// - @ref JS_DropIndexVocbaseCol "dropIndex" -/// - @ref JS_EnsureGeoIndexVocbaseCol "ensureGeoIndex" -/// - @ref JS_GetIndexesVocbaseCol "getIndexes" -/// -/// @section JSFQueries Query Functions -/// -/// @subsection JSFQueryBuilding Query Building Functions -/// -/// - @ref JS_AllQuery "all" -/// - @ref JS_DistanceQuery "distance" -/// - @ref JS_DocumentQuery "document" -/// - @ref JS_GeoQuery "geo" -/// - @ref JS_LimitQuery "limit" -/// - @ref JS_NearQuery "near" -/// - @ref JS_SelectQuery "select" -/// - @ref JS_SkipQuery "skip" -/// - @ref JS_WithinQuery "within" -/// -/// @subsection JSFQueryExecuting Query Execution Functions -/// -/// - @ref JS_CountQuery "count" -/// - @ref JS_ExplainQuery "explain" -/// - @ref JS_HasNextQuery "hasNext" -/// - @ref JS_NextQuery "next" -/// - @ref JS_NextRefQuery "nextRef" -/// - @ref JS_ShowQuery "show" -/// -/// @section JSFGlobal Global Functions -/// -/// - @ref JS_Execute "execute" -/// - @ref JS_Load "load" -/// - @ref JS_LogLevel "logLevel" -/// - @ref JS_Output "output" -/// - @ref JSF_print "print" -/// - @ref JS_ProcessCsvFile "processCsvFile" -/// - @ref JS_ProcessJsonFile "processJsonFile" -/// - @ref JS_Read "read" -/// - @ref JS_Time "time" +/// @addtogroup VocBase +/// @{ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @page JavaScriptFunc JavaScript Functions -/// -/// @section JSFDatabaseSelection Database Selection -/// -/// @ref MapGetVocBase "db".@FA{database} -/// -/// @section JSFDatabases Database Functions -/// -/// @copydetails JS_ParameterVocbaseCol -/// -/// @subsection JSFDocument Database Document Functions -/// -/// @copydetails JS_DeleteVocbaseCol -/// -/// @copydetails JS_ReplaceVocbaseCol -/// -/// @copydetails JS_SaveVocbaseCol -/// -/// @copydetails JS_SaveEdgesCol -/// -/// @subsection JSFIndex Database Index Functions -/// -/// @copydetails JS_DropIndexVocbaseCol -/// -/// @copydetails JS_EnsureGeoIndexVocbaseCol -/// -/// @copydetails JS_GetIndexesVocbaseCol -/// -/// @section JSFQueries Query Functions -/// -/// @subsection JSFQueryBuilding Query Building Functions -/// -/// @copydetails JS_AllQuery -/// -/// @copydetails JS_DistanceQuery -/// -/// @copydetails JS_DocumentQuery -/// -/// @copydetails JS_GeoQuery -/// -/// @copydetails JS_LimitQuery -/// -/// @copydetails JS_NearQuery -/// -/// @copydetails JS_SelectQuery -/// -/// @copydetails JS_SkipQuery -/// -/// @copydetails JS_WithinQuery -/// -/// @subsection JSFQueryExecuting Query Execution Functions -/// -/// @copydetails JS_CountQuery -/// -/// @copydetails JS_ExplainQuery -/// -/// @copydetails JS_HasNextQuery -/// -/// @copydetails JS_NextQuery -/// -/// @copydetails JS_NextRefQuery -/// -/// @copydetails JS_ShowQuery -/// -/// @section JSFGlobal Global Functions -/// -/// @copydetails JS_Execute -/// -/// @copydetails JS_Load -/// -/// @copydetails JS_LogLevel -/// -/// @copydetails JS_Output -/// -/// @copydetails JSF_print -/// -/// @copydetails JS_ProcessCsvFile -/// -/// @copydetails JS_ProcessJsonFile -/// -/// @copydetails JS_Read -/// -/// @copydetails JS_Time +/// @brief weak reference callback for a bridge //////////////////////////////////////////////////////////////////////////////// +static void WeakBridgeCallback (v8::Persistent object, void* parameter) { + TRI_barrier_t* barrier; + TRI_v8_global_t* v8g; + + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + barrier = (TRI_barrier_t*) parameter; + + LOG_TRACE("weak-callback for barrier called"); + + // find the persistent handle + v8::Persistent persistent = v8g->JSBarriers[barrier]; + v8g->JSBarriers.erase(barrier); + + // dispose and clear the persistent handle + persistent.Dispose(); + persistent.Clear(); + + // free the barrier + TRI_FreeBarrier(barrier); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief selects an attribute from the shaped json +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle MapGetShapedJson (v8::Local name, + const v8::AccessorInfo& info) { + v8::HandleScope scope; + + // sanity check + v8::Handle self = info.Holder(); + + if (self->InternalFieldCount() <= SLOT_BARRIER) { + return scope.Close(v8::ThrowException(v8::String::New("corrupted shaped json"))); + } + + // get shaped json + TRI_shaped_json_t* document = UnwrapClass(self, WRP_SHAPED_JSON_TYPE); + + if (document == 0) { + return scope.Close(v8::ThrowException(v8::String::New("corrupted shaped json"))); + } + + TRI_barrier_t* barrier = static_cast(v8::Handle::Cast(self->GetInternalField(SLOT_BARRIER))->Value()); + TRI_doc_collection_t* collection = barrier->_container->_collection; + + // convert the JavaScript string to a string + string key = TRI_ObjectToString(name); + + if (key == "") { + return scope.Close(v8::ThrowException(v8::String::New("name must not be empty"))); + } + + if (key[0] == '_') { + return scope.Close(v8::Handle()); + } + + // get shape accessor + TRI_shaper_t* shaper = collection->_shaper; + TRI_shape_pid_t pid = shaper->findAttributePathByName(shaper, key.c_str()); + TRI_shape_sid_t sid = document->_sid; + TRI_shape_access_t* acc = TRI_ShapeAccessor(shaper, sid, pid); + + if (acc == NULL || acc->_shape == NULL) { + return scope.Close(v8::Handle()); + } + + // convert to v8 value + TRI_shape_t const* shape = acc->_shape; + TRI_shaped_json_t json; + + if (TRI_ExecuteShapeAccessor(acc, document, &json)) { + return scope.Close(TRI_JsonShapeData(shaper, shape, json._data.data, json._data.length)); + } + + return scope.Close(v8::ThrowException(v8::String::New("cannot extract attribute"))); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief selects the keys from the shaped json +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle KeysOfShapedJson (const v8::AccessorInfo& info) { + v8::HandleScope scope; + TRI_v8_global_t* v8g; + + v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + + v8::Handle result = v8::Array::New(); + + // sanity check + v8::Handle self = info.Holder(); + + if (self->InternalFieldCount() <= SLOT_BARRIER) { + return scope.Close(result); + } + + // get shaped json + TRI_shaped_json_t* document = UnwrapClass(info.Holder(), WRP_SHAPED_JSON_TYPE); + + if (document == 0) { + return scope.Close(result); + } + + TRI_barrier_t* barrier = static_cast(v8::Handle::Cast(self->GetInternalField(SLOT_BARRIER))->Value()); + TRI_doc_collection_t* collection = barrier->_container->_collection; + + // check for array shape + TRI_shaper_t* shaper = collection->_shaper; + TRI_shape_t const* shape = shaper->lookupShapeId(shaper, document->_sid); + + if (shape == 0 || shape->_type != TRI_SHAPE_ARRAY) { + return scope.Close(result); + } + + TRI_array_shape_t const* s; + TRI_shape_aid_t const* aids; + TRI_shape_size_t i; + TRI_shape_size_t n; + char const* qtr = 0; + uint32_t count = 0; + + // shape is an array + s = (TRI_array_shape_t const*) shape; + + // number of entries + n = s->_fixedEntries + s->_variableEntries; + + // calculation position of attribute ids + qtr = (char const*) shape; + qtr += sizeof(TRI_array_shape_t); + qtr += n * sizeof(TRI_shape_sid_t); + aids = (TRI_shape_aid_t const*) qtr; + + for (i = 0; i < n; ++i, ++aids) { + char const* att = shaper->lookupAttributeId(shaper, *aids); + + if (att) { + result->Set(count++, v8::String::New(att)); + } + } + + result->Set(count++, v8g->DidKey); + result->Set(count++, v8g->RevKey); + + return scope.Close(result); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief check if a property is present +//////////////////////////////////////////////////////////////////////////////// + +static v8::Handle PropertyQueryShapedJson (v8::Local name, const v8::AccessorInfo& info) { + v8::HandleScope scope; + + // sanity check + v8::Handle self = info.Holder(); + + if (self->InternalFieldCount() <= SLOT_BARRIER) { + return scope.Close(v8::Handle()); + } + + // get shaped json + TRI_shaped_json_t* document = UnwrapClass(self, WRP_SHAPED_JSON_TYPE); + + if (document == 0) { + return scope.Close(v8::Handle()); + } + + TRI_barrier_t* barrier = static_cast(v8::Handle::Cast(self->GetInternalField(SLOT_BARRIER))->Value()); + TRI_doc_collection_t* collection = barrier->_container->_collection; + + // convert the JavaScript string to a string + string key = TRI_ObjectToString(name); + + if (key == "") { + return scope.Close(v8::Handle()); + } + + if (key == "_id") { + return scope.Close(v8::Handle(v8::Integer::New(v8::ReadOnly))); + } + + if (key == "_rev") { + return scope.Close(v8::Handle(v8::Integer::New(v8::ReadOnly))); + } + + // get shape accessor + TRI_shaper_t* shaper = collection->_shaper; + TRI_shape_pid_t pid = shaper->findAttributePathByName(shaper, key.c_str()); + TRI_shape_sid_t sid = document->_sid; + TRI_shape_access_t* acc = TRI_ShapeAccessor(shaper, sid, pid); + + // key not found + if (acc == NULL || acc->_shape == NULL) { + return scope.Close(v8::Handle()); + } + + return scope.Close(v8::Handle(v8::Integer::New(v8::ReadOnly))); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- MODULE +// ----------------------------------------------------------------------------- + // ----------------------------------------------------------------------------- // --SECTION-- public functions // ----------------------------------------------------------------------------- @@ -3832,7 +4011,9 @@ v8::Handle TRI_WrapVocBase (TRI_vocbase_t const* database) { WRP_VOCBASE_TYPE, const_cast(database)); - result->Set(v8::String::New("_path"), v8::String::New(database->_path)); + result->Set(v8::String::New("_path"), + v8::String::New(database->_path), + v8::ReadOnly); return scope.Close(result); } @@ -3850,7 +4031,9 @@ v8::Handle TRI_WrapEdges (TRI_vocbase_t const* database) { WRP_VOCBASE_TYPE, const_cast(database)); - result->Set(v8::String::New("_path"), v8::String::New(database->_path)); + result->Set(v8::String::New("_path"), + v8::String::New(database->_path), + v8::ReadOnly); return scope.Close(result); } @@ -3871,8 +4054,13 @@ v8::Handle TRI_WrapCollection (TRI_vocbase_col_t const* collection) result->SetInternalField(SLOT_QUERY, v8g->CollectionQueryType); result->SetInternalField(SLOT_RESULT_SET, v8::Null()); - result->Set(v8::String::New("_name"), v8::String::New(collection->_name)); - result->Set(v8::String::New("_id"), v8::Number::New(collection->_cid)); + result->Set(v8::String::New("_name"), + v8::String::New(collection->_name), + v8::ReadOnly); + + result->Set(v8::String::New("_id"), + v8::Number::New(collection->_cid), + v8::ReadOnly); return scope.Close(result); } @@ -3893,8 +4081,13 @@ v8::Handle TRI_WrapEdgesCollection (TRI_vocbase_col_t const* collect result->SetInternalField(SLOT_QUERY, v8g->CollectionQueryType); result->SetInternalField(SLOT_RESULT_SET, v8::Null()); - result->Set(v8::String::New("_name"), v8::String::New(collection->_name)); - result->Set(v8::String::New("_id"), v8::Number::New(collection->_cid)); + result->Set(v8::String::New("_name"), + v8::String::New(collection->_name), + v8::ReadOnly); + + result->Set(v8::String::New("_id"), + v8::Number::New(collection->_cid), + v8::ReadOnly); return scope.Close(result); } @@ -3903,17 +4096,52 @@ v8::Handle TRI_WrapEdgesCollection (TRI_vocbase_col_t const* collect /// @brief wraps a TRI_shaped_json_t //////////////////////////////////////////////////////////////////////////////// -v8::Handle TRI_WrapShapedJson (TRI_shaped_json_t const* shaped_json, TRI_vocbase_col_t const* collection) { +v8::Handle TRI_WrapShapedJson (TRI_vocbase_col_t const* collection, + TRI_doc_mptr_t const* document, + TRI_barrier_t* barrier) { TRI_v8_global_t* v8g; v8::HandleScope scope; v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); - v8::Handle result = WrapClass(v8g->ShapedJsonTempl, - WRP_SHAPED_JSON_TYPE, - const_cast(shaped_json)); - - result->SetInternalField(SLOT_QUERY, v8::External::New(const_cast(collection))); + // create the new handle to return, and set its template type + v8::Handle result = v8g->ShapedJsonTempl->NewInstance(); + + // point the 0 index Field to the c++ pointer for unwrapping later + result->SetInternalField(SLOT_CLASS_TYPE, v8::Integer::New(WRP_SHAPED_JSON_TYPE)); + result->SetInternalField(SLOT_CLASS, v8::External::New(const_cast(&document->_document))); + + map< void*, v8::Persistent >::iterator i = v8g->JSBarriers.find(barrier); + + if (i == v8g->JSBarriers.end()) { + v8::Persistent persistent = v8::Persistent::New(v8::External::New(barrier)); + result->SetInternalField(SLOT_BARRIER, persistent); + + v8g->JSBarriers[barrier] = persistent; + + persistent.MakeWeak(barrier, WeakBridgeCallback); + } + else { + result->SetInternalField(SLOT_BARRIER, i->second); + } + + // store the document reference + TRI_voc_did_t did = document->_did; + TRI_voc_rid_t rid = document->_rid; + + result->Set(v8g->DidKey, TRI_ObjectReference(collection->_collection->base._cid, did), v8::ReadOnly); + result->Set(v8g->RevKey, v8::Number::New(rid), v8::ReadOnly); + + TRI_df_marker_type_t type = ((TRI_df_marker_t*) document->_data)->_type; + + if (type == TRI_DOC_MARKER_EDGE) { + TRI_doc_edge_marker_t* marker = (TRI_doc_edge_marker_t*) document->_data; + + result->Set(v8g->FromKey, TRI_ObjectReference(marker->_fromCid, marker->_fromDid)); + result->Set(v8g->ToKey, TRI_ObjectReference(marker->_toCid, marker->_toDid)); + } + + // and return return scope.Close(result); } @@ -3954,9 +4182,12 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas // local function names // ............................................................................. - v8::Handle AllFuncName = v8::Persistent::New(v8::String::New("all")); + v8::Handle AllFuncName = v8::Persistent::New(v8::String::New("ALL")); + v8::Handle CompletionsFuncName = v8::Persistent::New(v8::String::New("_COMPLETIONS")); + v8::Handle NearFuncName = v8::Persistent::New(v8::String::New("NEAR")); + v8::Handle WithinFuncName = v8::Persistent::New(v8::String::New("WITHIN")); + v8::Handle CollectionsFuncName = v8::Persistent::New(v8::String::New("_collections")); - v8::Handle CompletionsFuncName = v8::Persistent::New(v8::String::New("COMPLETIONS")); v8::Handle CountFuncName = v8::Persistent::New(v8::String::New("count")); v8::Handle DeleteFuncName = v8::Persistent::New(v8::String::New("delete")); v8::Handle DistanceFuncName = v8::Persistent::New(v8::String::New("distance")); @@ -3964,16 +4195,20 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas v8::Handle DropIndexFuncName = v8::Persistent::New(v8::String::New("dropIndex")); v8::Handle EdgesFuncName = v8::Persistent::New(v8::String::New("edges")); v8::Handle EnsureGeoIndexFuncName = v8::Persistent::New(v8::String::New("ensureGeoIndex")); + v8::Handle EnsureHashIndexFuncName = v8::Persistent::New(v8::String::New("ensureHashIndex")); + v8::Handle EnsureMultiHashIndexFuncName = v8::Persistent::New(v8::String::New("ensureMultiHashIndex")); + v8::Handle EnsureSkiplistIndexFuncName = v8::Persistent::New(v8::String::New("ensureSLIndex")); + v8::Handle EnsureMultiSkiplistIndexFuncName = v8::Persistent::New(v8::String::New("ensureMultiSLIndex")); v8::Handle ExecuteFuncName = v8::Persistent::New(v8::String::New("execute")); v8::Handle ExplainFuncName = v8::Persistent::New(v8::String::New("explain")); v8::Handle FiguresFuncName = v8::Persistent::New(v8::String::New("figures")); v8::Handle GeoFuncName = v8::Persistent::New(v8::String::New("geo")); v8::Handle GetIndexesFuncName = v8::Persistent::New(v8::String::New("getIndexes")); v8::Handle HasNextFuncName = v8::Persistent::New(v8::String::New("hasNext")); + v8::Handle IndexToUse = v8::Persistent::New(v8::String::New("index")); v8::Handle InEdgesFuncName = v8::Persistent::New(v8::String::New("inEdges")); v8::Handle LimitFuncName = v8::Persistent::New(v8::String::New("limit")); v8::Handle LoadFuncName = v8::Persistent::New(v8::String::New("load")); - v8::Handle NearFuncName = v8::Persistent::New(v8::String::New("near")); v8::Handle NextFuncName = v8::Persistent::New(v8::String::New("next")); v8::Handle NextRefFuncName = v8::Persistent::New(v8::String::New("nextRef")); v8::Handle OptimiseFuncName = v8::Persistent::New(v8::String::New("optimise")); @@ -3987,10 +4222,7 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas v8::Handle StatusFuncName = v8::Persistent::New(v8::String::New("status")); v8::Handle ToArrayFuncName = v8::Persistent::New(v8::String::New("toArray")); v8::Handle UseNextFuncName = v8::Persistent::New(v8::String::New("useNext")); - v8::Handle WithinFuncName = v8::Persistent::New(v8::String::New("within")); - v8::Handle DocumentWrappedFuncName = v8::Persistent::New(v8::String::New("document_wrapped")); - // ............................................................................. // query types // ............................................................................. @@ -4006,6 +4238,22 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas v8g->SyncAfterObjectsKey = v8::Persistent::New(v8::String::New("syncAfterObjects")); v8g->SyncAfterTimeKey = v8::Persistent::New(v8::String::New("syncAfterTime")); + if (v8g->DidKey.IsEmpty()) { + v8g->DidKey = v8::Persistent::New(v8::String::New("_id")); + } + + if (v8g->RevKey.IsEmpty()) { + v8g->RevKey = v8::Persistent::New(v8::String::New("_rev")); + } + + if (v8g->FromKey.IsEmpty()) { + v8g->FromKey = v8::Persistent::New(v8::String::New("_from")); + } + + if (v8g->ToKey.IsEmpty()) { + v8g->ToKey = v8::Persistent::New(v8::String::New("_to")); + } + // ............................................................................. // generate the TRI_vocbase_t template // ............................................................................. @@ -4059,8 +4307,8 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas rt = ft->InstanceTemplate(); rt->SetInternalFieldCount(3); - rt->SetNamedPropertyHandler(MapWrappedShapedJson, // NamedPropertyGetter, - 0, // NamedPropertySetter setter = 0, + rt->SetNamedPropertyHandler(MapGetShapedJson, // NamedPropertyGetter, + 0, // NamedPropertySetter setter = 0 PropertyQueryShapedJson, // NamedPropertyQuery, 0, // NamedPropertyDeleter deleter = 0, KeysOfShapedJson // NamedPropertyEnumerator, @@ -4085,30 +4333,27 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas v8g->VocbaseColTempl = v8::Persistent::New(rt); - rt->Set(AllFuncName, v8::FunctionTemplate::New(JS_AllQuery)); // TO BE DELETED - rt->Set(DocumentFuncName, v8::FunctionTemplate::New(JS_DocumentQuery)); // TO BE DELETED - rt->Set(EdgesFuncName, v8::FunctionTemplate::New(JS_EdgesQuery)); - rt->Set(GeoFuncName, v8::FunctionTemplate::New(JS_GeoQuery)); - rt->Set(InEdgesFuncName, v8::FunctionTemplate::New(JS_InEdgesQuery)); - rt->Set(NearFuncName, v8::FunctionTemplate::New(JS_NearQuery)); - rt->Set(OutEdgesFuncName, v8::FunctionTemplate::New(JS_OutEdgesQuery)); - rt->Set(SelectFuncName, v8::FunctionTemplate::New(JS_SelectQuery)); - rt->Set(WithinFuncName, v8::FunctionTemplate::New(JS_WithinQuery)); - + rt->Set(AllFuncName, v8::FunctionTemplate::New(JS_AllQuery)); rt->Set(CountFuncName, v8::FunctionTemplate::New(JS_CountVocbaseCol)); rt->Set(DeleteFuncName, v8::FunctionTemplate::New(JS_DeleteVocbaseCol)); + rt->Set(DocumentFuncName, v8::FunctionTemplate::New(JS_DocumentQuery)); rt->Set(DropIndexFuncName, v8::FunctionTemplate::New(JS_DropIndexVocbaseCol)); rt->Set(EnsureGeoIndexFuncName, v8::FunctionTemplate::New(JS_EnsureGeoIndexVocbaseCol)); + rt->Set(EnsureHashIndexFuncName, v8::FunctionTemplate::New(JS_EnsureHashIndexVocbaseCol)); + rt->Set(EnsureMultiHashIndexFuncName, v8::FunctionTemplate::New(JS_EnsureMultiHashIndexVocbaseCol)); + rt->Set(EnsureMultiSkiplistIndexFuncName, v8::FunctionTemplate::New(JS_EnsureMultiSkiplistIndexVocbaseCol)); + rt->Set(EnsureSkiplistIndexFuncName, v8::FunctionTemplate::New(JS_EnsureSkiplistIndexVocbaseCol)); rt->Set(FiguresFuncName, v8::FunctionTemplate::New(JS_FiguresVocbaseCol)); rt->Set(GetIndexesFuncName, v8::FunctionTemplate::New(JS_GetIndexesVocbaseCol)); rt->Set(LoadFuncName, v8::FunctionTemplate::New(JS_LoadVocbaseCol)); + rt->Set(NearFuncName, v8::FunctionTemplate::New(JS_NearQuery)); rt->Set(ParameterFuncName, v8::FunctionTemplate::New(JS_ParameterVocbaseCol)); - rt->Set(ReplaceFuncName, v8::FunctionTemplate::New(JS_ReplaceVocbaseCol)); - rt->Set(SaveFuncName, v8::FunctionTemplate::New(JS_SaveVocbaseCol)); rt->Set(StatusFuncName, v8::FunctionTemplate::New(JS_StatusVocbaseCol)); + rt->Set(WithinFuncName, v8::FunctionTemplate::New(JS_WithinQuery)); - rt->Set(DocumentWrappedFuncName, v8::FunctionTemplate::New(JS_DocumentQueryWrapped)); - + rt->Set(SaveFuncName, v8::FunctionTemplate::New(JS_SaveVocbaseCol)); + rt->Set(ReplaceFuncName, v8::FunctionTemplate::New(JS_ReplaceVocbaseCol)); + // must come after SetInternalFieldCount context->Global()->Set(v8::String::New("AvocadoCollection"), ft->GetFunction()); @@ -4124,26 +4369,29 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas rt->SetInternalFieldCount(SLOT_END); rt->Set(AllFuncName, v8::FunctionTemplate::New(JS_AllQuery)); - rt->Set(DocumentFuncName, v8::FunctionTemplate::New(JS_DocumentQuery)); - rt->Set(EdgesFuncName, v8::FunctionTemplate::New(JS_EdgesQuery)); - rt->Set(GeoFuncName, v8::FunctionTemplate::New(JS_GeoQuery)); - rt->Set(InEdgesFuncName, v8::FunctionTemplate::New(JS_InEdgesQuery)); - rt->Set(NearFuncName, v8::FunctionTemplate::New(JS_NearQuery)); - rt->Set(OutEdgesFuncName, v8::FunctionTemplate::New(JS_OutEdgesQuery)); - rt->Set(SelectFuncName, v8::FunctionTemplate::New(JS_SelectQuery)); - rt->Set(WithinFuncName, v8::FunctionTemplate::New(JS_WithinQuery)); - rt->Set(CountFuncName, v8::FunctionTemplate::New(JS_CountVocbaseCol)); rt->Set(DeleteFuncName, v8::FunctionTemplate::New(JS_DeleteVocbaseCol)); + rt->Set(DocumentFuncName, v8::FunctionTemplate::New(JS_DocumentQuery)); rt->Set(DropIndexFuncName, v8::FunctionTemplate::New(JS_DropIndexVocbaseCol)); rt->Set(EnsureGeoIndexFuncName, v8::FunctionTemplate::New(JS_EnsureGeoIndexVocbaseCol)); + rt->Set(EnsureHashIndexFuncName, v8::FunctionTemplate::New(JS_EnsureHashIndexVocbaseCol)); + rt->Set(EnsureMultiHashIndexFuncName, v8::FunctionTemplate::New(JS_EnsureMultiHashIndexVocbaseCol)); + rt->Set(EnsureMultiSkiplistIndexFuncName, v8::FunctionTemplate::New(JS_EnsureMultiSkiplistIndexVocbaseCol)); + rt->Set(EnsureSkiplistIndexFuncName, v8::FunctionTemplate::New(JS_EnsureSkiplistIndexVocbaseCol)); rt->Set(FiguresFuncName, v8::FunctionTemplate::New(JS_FiguresVocbaseCol)); rt->Set(GetIndexesFuncName, v8::FunctionTemplate::New(JS_GetIndexesVocbaseCol)); rt->Set(LoadFuncName, v8::FunctionTemplate::New(JS_LoadVocbaseCol)); + rt->Set(NearFuncName, v8::FunctionTemplate::New(JS_NearQuery)); rt->Set(ParameterFuncName, v8::FunctionTemplate::New(JS_ParameterVocbaseCol)); + rt->Set(StatusFuncName, v8::FunctionTemplate::New(JS_StatusVocbaseCol)); + rt->Set(WithinFuncName, v8::FunctionTemplate::New(JS_WithinQuery)); + rt->Set(ReplaceFuncName, v8::FunctionTemplate::New(JS_ReplaceEdgesCol)); rt->Set(SaveFuncName, v8::FunctionTemplate::New(JS_SaveEdgesCol)); - rt->Set(StatusFuncName, v8::FunctionTemplate::New(JS_StatusVocbaseCol)); + + rt->Set(EdgesFuncName, v8::FunctionTemplate::New(JS_EdgesQuery)); + rt->Set(InEdgesFuncName, v8::FunctionTemplate::New(JS_InEdgesQuery)); + rt->Set(OutEdgesFuncName, v8::FunctionTemplate::New(JS_OutEdgesQuery)); v8g->EdgesColTempl = v8::Persistent::New(rt); @@ -4151,43 +4399,7 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas context->Global()->Set(v8::String::New("AvocadoEdgesCollection"), ft->GetFunction()); - // ............................................................................. - // generate the fluent query template - // ............................................................................. - - ft = v8::FunctionTemplate::New(); - ft->SetClassName(v8::String::New("AvocadoFluentQuery")); - - rt = ft->InstanceTemplate(); - rt->SetInternalFieldCount(SLOT_END); - - rt->Set(AllFuncName, v8::FunctionTemplate::New(JS_AllQuery)); - rt->Set(CountFuncName, v8::FunctionTemplate::New(JS_CountQuery)); - rt->Set(DistanceFuncName, v8::FunctionTemplate::New(JS_DistanceQuery)); - rt->Set(DocumentFuncName, v8::FunctionTemplate::New(JS_DocumentQuery)); - rt->Set(EdgesFuncName, v8::FunctionTemplate::New(JS_EdgesQuery)); - rt->Set(ExplainFuncName, v8::FunctionTemplate::New(JS_ExplainQuery)); - rt->Set(GeoFuncName, v8::FunctionTemplate::New(JS_GeoQuery)); - rt->Set(HasNextFuncName, v8::FunctionTemplate::New(JS_HasNextQuery)); - rt->Set(InEdgesFuncName, v8::FunctionTemplate::New(JS_InEdgesQuery)); - rt->Set(LimitFuncName, v8::FunctionTemplate::New(JS_LimitQuery)); - rt->Set(NearFuncName, v8::FunctionTemplate::New(JS_NearQuery)); - rt->Set(NextFuncName, v8::FunctionTemplate::New(JS_NextQuery)); - rt->Set(NextRefFuncName, v8::FunctionTemplate::New(JS_NextRefQuery)); - rt->Set(OptimiseFuncName, v8::FunctionTemplate::New(JS_OptimiseQuery)); - rt->Set(OutEdgesFuncName, v8::FunctionTemplate::New(JS_OutEdgesQuery)); - rt->Set(SelectFuncName, v8::FunctionTemplate::New(JS_SelectQuery)); - rt->Set(ShowFuncName, v8::FunctionTemplate::New(JS_ShowQuery)); - rt->Set(SkipFuncName, v8::FunctionTemplate::New(JS_SkipQuery)); - rt->Set(ToArrayFuncName, v8::FunctionTemplate::New(JS_ToArrayQuery)); - rt->Set(WithinFuncName, v8::FunctionTemplate::New(JS_WithinQuery)); - - v8g->FluentQueryTempl = v8::Persistent::New(rt); - - // must come after SetInternalFieldCount - context->Global()->Set(v8::String::New("AvocadoFluentQuery"), - ft->GetFunction()); - +/* DEPRECATED */ // ............................................................................. // generate the where clause template // ............................................................................. @@ -4221,6 +4433,41 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas // must come after SetInternalFieldCount context->Global()->Set(v8::String::New("AvocadoQuery"), ft->GetFunction()); +/* DEPRECATED END */ + + // ............................................................................. + // generate the query instance template + // ............................................................................. + + ft = v8::FunctionTemplate::New(); + ft->SetClassName(v8::String::New("AvocadoQueryInstance")); + + rt = ft->InstanceTemplate(); + rt->SetInternalFieldCount(2); + + rt->Set(ExecuteFuncName, v8::FunctionTemplate::New(JS_ExecuteQueryInstance)); + + v8g->QueryInstanceTempl = v8::Persistent::New(rt); + + // must come after SetInternalFieldCount + context->Global()->Set(v8::String::New("AvocadoQueryInstance"), + ft->GetFunction()); + + // ............................................................................. + // generate the query error template + // ............................................................................. + + ft = v8::FunctionTemplate::New(); + ft->SetClassName(v8::String::New("AvocadoQueryError")); + + rt = ft->InstanceTemplate(); + rt->SetInternalFieldCount(2); + + v8g->QueryErrorTempl = v8::Persistent::New(rt); + + // must come after SetInternalFieldCount + context->Global()->Set(v8::String::New("AvocadoQueryError"), + ft->GetFunction()); // ............................................................................. // generate the cursor template @@ -4236,6 +4483,7 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas rt->Set(NextFuncName, v8::FunctionTemplate::New(JS_NextCursor)); rt->Set(NextRefFuncName, v8::FunctionTemplate::New(JS_NextRefCursor)); rt->Set(UseNextFuncName, v8::FunctionTemplate::New(JS_UseNextCursor)); + rt->Set(CountFuncName, v8::FunctionTemplate::New(JS_CountCursor)); v8g->CursorTempl = v8::Persistent::New(rt); @@ -4247,6 +4495,7 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas // create the global functions // ............................................................................. +/* DEPRECATED */ context->Global()->Set(v8::String::New("AQL_WHERE_BOOLEAN"), v8::FunctionTemplate::New(JS_WhereBooleanAql)->GetFunction(), v8::ReadOnly); @@ -4255,6 +4504,14 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas v8::FunctionTemplate::New(JS_WhereGeneralAql)->GetFunction(), v8::ReadOnly); + context->Global()->Set(v8::String::New("AQL_WHERE_HASH_CONST"), + v8::FunctionTemplate::New(JS_WhereHashConstAql)->GetFunction(), + v8::ReadOnly); + + context->Global()->Set(v8::String::New("AQL_WHERE_SL_CONST"), + v8::FunctionTemplate::New(JS_WhereSkiplistConstAql)->GetFunction(), + v8::ReadOnly); + context->Global()->Set(v8::String::New("AQL_WHERE_PRIMARY_CONST"), v8::FunctionTemplate::New(JS_WherePrimaryConstAql)->GetFunction(), v8::ReadOnly); @@ -4266,7 +4523,15 @@ void TRI_InitV8VocBridge (v8::Handle context, TRI_vocbase_t* vocbas context->Global()->Set(v8::String::New("AQL_SELECT"), v8::FunctionTemplate::New(JS_SelectAql)->GetFunction(), v8::ReadOnly); + + context->Global()->Set(v8::String::New("AQL_HASH_SELECT"), + v8::FunctionTemplate::New(JS_HashSelectAql)->GetFunction(), + v8::ReadOnly); + context->Global()->Set(v8::String::New("AQL_SL_SELECT"), + v8::FunctionTemplate::New(JS_SkiplistSelectAql)->GetFunction(), + v8::ReadOnly); +/* DEPRECATED END */ context->Global()->Set(v8::String::New("AQL_PREPARE"), v8::FunctionTemplate::New(JS_PrepareAql)->GetFunction(), v8::ReadOnly); diff --git a/V8/v8-vocbase.h b/V8/v8-vocbase.h index f2c228d063..72eb98a71b 100644 --- a/V8/v8-vocbase.h +++ b/V8/v8-vocbase.h @@ -30,6 +30,7 @@ #include "V8/v8-globals.h" #include "ShapedJson/shaped-json.h" +#include "VocBase/document-collection.h" // ----------------------------------------------------------------------------- // --SECTION-- documentation @@ -120,65 +121,126 @@ //////////////////////////////////////////////////////////////////////////////// /// @page GeoCoordinates Geo Coordinates /// -/// The AvocadoDB allows to selects documents based on geographic -/// coordinates. In order for this to work, a geo-spatial index must be defined. -/// This index will use a very elaborate algorithm to lookup neighbours that is -/// a magnitude faster than a simple R* index. -/// -/// In general a geo coordinate is a pair of latitude and longitude. This can -/// either be an list with two elements like @CODE{[ -10\, +30 ]} (latitude -/// first, followed by longitude) or an object like @CODE{{ lon: -10\, lat: +30 -/// }}. In order to find all documents within a given radius around a -/// coordinate use the @FN{within} operator. In order to find all -/// documents near a given document use the @FN{near} operator. -/// -/// It is possible to define more than one geo-spatial index per collection. In -/// this case you must give a hint which of indexes should be used in a query. -/// /// @section EnsureGeoIndex Create a Geo-Spatial Index /// /// First create an index. /// /// @copydetails JS_EnsureGeoIndexVocbaseCol -/// -/// @section NearOperator The Near Operator -/// -/// @copydetails JS_NearQuery -/// -/// @section WithinOperator The Within Operator -/// -/// @copydetails JS_WithinQuery -/// -/// @section GeoOperator The Geo Operator -/// -/// @copydetails JS_GeoQuery //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @page Pagination Pagination +/// @page JavaScriptFuncIndex JavaScript Function Index /// -/// @section LimitOperator The Limit Operator +/// @section JSFDatabaseSelection Database Selection /// -/// If, for example, you display the result of a user search, then you are in -/// general not interested in the completed result set, but only the first 10 -/// documents. In this case, you can the @FN{limit} operator. This operators -/// works like LIMIT in MySQL, it specifies a maximal number of documents to -/// return. +/// - @ref MapGetVocBase "db".@FA{database} /// -/// @verbinclude fluent4 +/// - @ref MapGetVocBase "edges".@FA{database} /// -/// @copydetails JS_LimitQuery +/// @section JSFDatabases Database Functions /// -/// @section SkipOperator The Skip Operator +/// - @ref JS_ParameterVocbaseCol "parameter" /// -/// @FN{skip} used together with @FN{limit} can be used to implement -/// pagination. The @FN{skip} operator skips over the first n documents. So, in -/// order to create result pages with 10 result documents per page, you can use -/// @CODE{skip(n * 10).limit(10)} to access the n.th page. +/// @subsection JSFDocument Database Document Functions /// -/// @verbinclude fluent5 +/// - @ref JS_DeleteVocbaseCol "delete" +/// - @ref JS_ReplaceVocbaseCol "replace" +/// - @ref JS_SaveVocbaseCol "save" +/// - @ref JS_SaveEdgesCol "save" for edges /// -/// @copydetails JS_SkipQuery +/// @subsection JSFIndex Database Index Functions +/// +/// - @ref JS_DropIndexVocbaseCol "dropIndex" +/// - @ref JS_EnsureGeoIndexVocbaseCol "ensureGeoIndex" +/// - @ref JS_EnsureHashIndexVocbaseCol "ensureHashIndex" +/// - @ref JS_EnsureMultiHashIndexVocbaseCol "ensureMultiHashIndex" +/// - @ref JS_GetIndexesVocbaseCol "getIndexes" +/// +/// @section JSFQueries Query Functions +/// +/// @subsection JSFQueryBuilding Query Building Functions +/// +/// - @ref JS_AllQuery "all" +/// - @ref JS_DocumentQuery "document" +/// - @ref JS_SelectQuery "select" +/// +/// @section JSFGlobal Global Functions +/// +/// - @ref JS_Execute "execute" +/// - @ref JS_Load "load" +/// - @ref JS_LogLevel "logLevel" +/// - @ref JS_Output "output" +/// - @ref JSF_print "print" +/// - @ref JS_ProcessCsvFile "processCsvFile" +/// - @ref JS_ProcessJsonFile "processJsonFile" +/// - @ref JS_Read "read" +/// - @ref JS_Time "time" +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @page JavaScriptFunc JavaScript Functions +/// +/// @section JSFDatabaseSelection Database Selection +/// +/// @ref MapGetVocBase "db".@FA{database} +/// +/// @section JSFDatabases Database Functions +/// +/// @copydetails JS_ParameterVocbaseCol +/// +/// @subsection JSFDocument Database Document Functions +/// +/// @copydetails JS_DeleteVocbaseCol +/// +/// @copydetails JS_ReplaceVocbaseCol +/// +/// @copydetails JS_SaveVocbaseCol +/// +/// @copydetails JS_SaveEdgesCol +/// +/// @subsection JSFIndex Database Index Functions +/// +/// @copydetails JS_DropIndexVocbaseCol +/// +/// @copydetails JS_EnsureGeoIndexVocbaseCol +/// +/// @copydetails JS_EnsureHashIndexVocbaseCol +/// +/// @copydetails JS_EnsureMultiHashIndexVocbaseCol +/// +/// @copydetails JS_GetIndexesVocbaseCol +/// +/// @section JSFQueries Query Functions +/// +/// @subsection JSFQueryBuilding Query Building Functions +/// +/// @copydetails JS_DocumentQuery +/// +/// @copydetails JS_NearQuery +/// +/// @copydetails JS_SelectQuery +/// +/// @subsection JSFQueryExecuting Query Execution Functions +/// +/// @section JSFGlobal Global Functions +/// +/// @copydetails JS_Execute +/// +/// @copydetails JS_Load +/// +/// @copydetails JS_LogLevel +/// +/// @copydetails JS_Output +/// +/// @copydetails JSF_print +/// +/// @copydetails JS_ProcessCsvFile +/// +/// @copydetails JS_ProcessJsonFile +/// +/// @copydetails JS_Read +/// +/// @copydetails JS_Time //////////////////////////////////////////////////////////////////////////////// // ----------------------------------------------------------------------------- @@ -218,7 +280,9 @@ v8::Handle TRI_WrapEdgesCollection (TRI_vocbase_col_t const*); /// @brief wraps a TRI_shaped_json_t //////////////////////////////////////////////////////////////////////////////// -v8::Handle TRI_WrapShapedJson (TRI_shaped_json_t const*, TRI_vocbase_col_t const*); +v8::Handle TRI_WrapShapedJson (TRI_vocbase_col_t const* collection, + TRI_doc_mptr_t const* document, + TRI_barrier_t* barrier); //////////////////////////////////////////////////////////////////////////////// /// @brief creates a TRI_vocbase_t global context diff --git a/VocBase/barrier.c b/VocBase/barrier.c new file mode 100644 index 0000000000..8efa229c63 --- /dev/null +++ b/VocBase/barrier.c @@ -0,0 +1,199 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief deletion barriers for datafiles +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2011 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +/// @author Copyright 2011, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "barrier.h" + +#include "VocBase/document-collection.h" + +// ----------------------------------------------------------------------------- +// --SECTION-- BARRIER +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialises a barrier list +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitBarrierList (TRI_barrier_list_t* container, TRI_doc_collection_t* collection) { + container->_collection = collection; + + TRI_InitSpin(&container->_lock); + + container->_begin = NULL; + container->_end = NULL; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys a barrier list +//////////////////////////////////////////////////////////////////////////////// + +void TRI_DestroyBarrierList (TRI_barrier_list_t* container) { + TRI_barrier_t* ptr; + TRI_barrier_t* next; + + ptr = container->_begin; + + while (ptr != NULL) { + next = ptr->_next; + ptr->_container = NULL; + ptr = next; + } + + TRI_DestroySpin(&container->_lock); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a new barrier element +//////////////////////////////////////////////////////////////////////////////// + +TRI_barrier_t* TRI_CreateBarrierElement (TRI_barrier_list_t* container) { + TRI_barrier_t* element; + + element = TRI_Allocate(sizeof(TRI_barrier_t)); + + element->_type = TRI_BARRIER_ELEMENT; + element->_container = container; + element->_datafile = NULL; + element->datafileCallback = NULL; + + TRI_LockSpin(&container->_lock); + + // empty list + if (container->_end == NULL) { + element->_next = NULL; + element->_prev = NULL; + + container->_begin = element; + container->_end = element; + } + + // add to the end + else { + element->_next = NULL; + element->_prev = container->_end; + + container->_end->_next = element; + container->_end = element; + } + + TRI_UnlockSpin(&container->_lock); + + return element; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a new datafile deletion barrier +//////////////////////////////////////////////////////////////////////////////// + +TRI_barrier_t* TRI_CreateBarrierDatafile (TRI_barrier_list_t* container, + TRI_datafile_t* datafile, + void (*callback) (struct TRI_datafile_s*, void*), + void* data) { + TRI_barrier_t* element; + + element = TRI_Allocate(sizeof(TRI_barrier_t)); + + element->_type = TRI_BARRIER_DATAFILE; + element->_container = container; + element->_datafile = datafile; + element->_datafileData = data; + element->datafileCallback = callback; + + TRI_LockSpin(&container->_lock); + + // empty list + if (container->_end == NULL) { + element->_next = NULL; + element->_prev = NULL; + + container->_begin = element; + container->_end = element; + } + + // add to the end + else { + element->_next = NULL; + element->_prev = container->_end; + + container->_end->_next = element; + container->_end = element; + } + + TRI_UnlockSpin(&container->_lock); + + return element; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes and frees a barrier element or datafile deletion marker +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeBarrier (TRI_barrier_t* element) { + TRI_barrier_list_t* container; + + container = element->_container; + + TRI_LockSpin(&container->_lock); + + // element is at the beginning of the chain + if (element->_prev == NULL) { + container->_begin = element->_next; + } + else { + element->_prev->_next = element->_next; + } + + // element is at the end of the chain + if (element->_next == NULL) { + container->_end = element->_prev; + } + else { + element->_next->_prev = element->_prev; + } + + TRI_UnlockSpin(&container->_lock); + + // free the element + TRI_Free(element); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/VocBase/barrier.h b/VocBase/barrier.h new file mode 100644 index 0000000000..b7cf6910a6 --- /dev/null +++ b/VocBase/barrier.h @@ -0,0 +1,154 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief deletion barriers for datafiles +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2011 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +/// @author Copyright 2011, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#ifndef TRIAGENS_DURHAM_VOC_BASE_BARRIER_H +#define TRIAGENS_DURHAM_VOC_BASE_BARRIER_H 1 + +#include "BasicsC/locks.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// ----------------------------------------------------------------------------- +// --SECTION-- forward declarations +// ----------------------------------------------------------------------------- + +struct TRI_doc_collection_s; +struct TRI_datafile_s; + +// ----------------------------------------------------------------------------- +// --SECTION-- public types +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief barrier element type +//////////////////////////////////////////////////////////////////////////////// + +typedef enum { + TRI_BARRIER_ELEMENT, + TRI_BARRIER_DATAFILE +} +TRI_barrier_type_e; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief barrier element +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_barrier_s { + struct TRI_barrier_s* _prev; + struct TRI_barrier_s* _next; + + struct TRI_barrier_list_s* _container; + + TRI_barrier_type_e _type; + + struct TRI_datafile_s* _datafile; + void* _datafileData; + void (*datafileCallback) (struct TRI_datafile_s*, void*); +} +TRI_barrier_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief doubly linked list of barriers +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_barrier_list_s { + struct TRI_doc_collection_s* _collection; + + TRI_spin_t _lock; + + TRI_barrier_t* _begin; + TRI_barrier_t* _end; +} +TRI_barrier_list_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialises a barrier list +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitBarrierList (TRI_barrier_list_t* container, struct TRI_doc_collection_s* collection); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys a barrier list +//////////////////////////////////////////////////////////////////////////////// + +void TRI_DestroyBarrierList (TRI_barrier_list_t* container); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a new barrier element +//////////////////////////////////////////////////////////////////////////////// + +TRI_barrier_t* TRI_CreateBarrierElement (TRI_barrier_list_t* container); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a new datafile deletion barrier +//////////////////////////////////////////////////////////////////////////////// + +TRI_barrier_t* TRI_CreateBarrierDatafile (TRI_barrier_list_t* container, + struct TRI_datafile_s* datafile, + void (*callback) (struct TRI_datafile_s*, void*), + void* data); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes and frees a barrier element or datafile deletion marker +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeBarrier (TRI_barrier_t* element); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/VocBase/collection.c b/VocBase/collection.c index 709c492d80..f831ed3ebc 100644 --- a/VocBase/collection.c +++ b/VocBase/collection.c @@ -399,6 +399,9 @@ TRI_collection_t* TRI_CreateCollection (TRI_collection_t* collection, // create collection structure if (collection == NULL) { collection = TRI_Allocate(sizeof(TRI_collection_t)); + if (!collection) { + // TODO: FIXME + } } InitCollection(collection, filename, parameter); @@ -738,6 +741,9 @@ TRI_collection_t* TRI_OpenCollection (TRI_collection_t* collection, // create collection if (collection == NULL) { collection = TRI_Allocate(sizeof(TRI_collection_t)); + if (!collection) { + // TODO: FIXME + } freeCol = true; } diff --git a/VocBase/compactor.c b/VocBase/compactor.c index 51abf9a1a3..34cdc367f7 100644 --- a/VocBase/compactor.c +++ b/VocBase/compactor.c @@ -368,7 +368,7 @@ static void CompactifyDatafile (TRI_sim_collection_t* collection, TRI_voc_fid_t } // add a deletion marker to the result set container - TRI_AddDatafileRSContainer(&collection->base._resultSets, df, RemoveDatafileCallback, &collection->base.base); + TRI_CreateBarrierDatafile(&collection->base._barrierList, df, RemoveDatafileCallback, &collection->base.base); } //////////////////////////////////////////////////////////////////////////////// @@ -429,16 +429,16 @@ static void CompactifySimCollection (TRI_sim_collection_t* collection) { //////////////////////////////////////////////////////////////////////////////// static void CleanupSimCollection (TRI_sim_collection_t* collection) { - TRI_rs_container_t* container; - TRI_rs_container_element_t* element; + TRI_barrier_list_t* container; + TRI_barrier_t* element; - container = &collection->base._resultSets; + container = &collection->base._barrierList; element = NULL; // check and remove a datafile element at the beginning of the list TRI_LockSpin(&container->_lock); - if (container->_begin != NULL && container->_begin->_type == TRI_RSCE_DATAFILE) { + if (container->_begin != NULL && container->_begin->_type == TRI_BARRIER_DATAFILE) { element = container->_begin; container->_begin = element->_next; diff --git a/VocBase/data-feeder.c b/VocBase/data-feeder.c index 53fb500e33..4c34bb8a0f 100644 --- a/VocBase/data-feeder.c +++ b/VocBase/data-feeder.c @@ -26,124 +26,1065 @@ //////////////////////////////////////////////////////////////////////////////// #include "VocBase/data-feeder.h" +#include "VocBase/join.h" +#include "V8/v8-c-utils.h" +#include "QL/optimize.h" //////////////////////////////////////////////////////////////////////////////// /// @addtogroup VocBase /// @{ //////////////////////////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- +// --SECTION-- type independent functions +// ----------------------------------------------------------------------------- + //////////////////////////////////////////////////////////////////////////////// -/// @brief init select data feeder +/// @brief create a new base data data feeder struct //////////////////////////////////////////////////////////////////////////////// -static void InitFeeder (TRI_data_feeder_t* feeder) { +static TRI_data_feeder_t* CreateDataFeeder (const TRI_data_feeder_type_e type, + const TRI_doc_collection_t* collection, + const TRI_join_t* join, + size_t level) { + TRI_data_feeder_t* feeder; + + feeder = (TRI_data_feeder_t*) TRI_Allocate(sizeof(TRI_data_feeder_t)); + if (!feeder) { + return NULL; + } + + feeder->_type = type; + feeder->_level = level; + feeder->_join = (TRI_select_join_t*) join; + feeder->_part = (TRI_join_part_t*) ((TRI_select_join_t*) join)->_parts._buffer[level]; + feeder->_collection = collection; + feeder->_ranges = NULL; + feeder->_state = NULL; + + feeder->init = NULL; + feeder->rewind = NULL; + feeder->current = NULL; + feeder->eof = NULL; + feeder->free = NULL; + + return feeder; +} + +// ----------------------------------------------------------------------------- +// --SECTION-- table scan +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief init table scan data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void InitFeederTableScan (TRI_data_feeder_t* feeder) { TRI_sim_collection_t* collection; TRI_doc_mptr_t* document; + TRI_data_feeder_table_scan_t* state; + + feeder->_accessType = ACCESS_ALL; collection = (TRI_sim_collection_t*) feeder->_collection; + state = (TRI_data_feeder_table_scan_t*) feeder->_state; + if (collection->_primaryIndex._nrAlloc == 0) { - feeder->_start = NULL; - feeder->_end = NULL; - feeder->_current = NULL; + state->_start = NULL; + state->_end = NULL; + state->_current = NULL; return; } - feeder->_start = (void**) collection->_primaryIndex._table; - feeder->_end = (void**) (feeder->_start + collection->_primaryIndex._nrAlloc); + state->_start = (void**) collection->_primaryIndex._table; + state->_end = (void**) (state->_start + collection->_primaryIndex._nrAlloc); // collections contain documents in a hash table // some of the entries are empty, and some contain deleted documents // it is invalid to use every entry from the hash table but the invalid documents // must be skipped. // adjust starts to first valid document in collection - while (feeder->_start < feeder->_end) { - document = (TRI_doc_mptr_t*) *(feeder->_start); + while (state->_start < state->_end) { + document = (TRI_doc_mptr_t*) *(state->_start); if (document != NULL && !document->_deletion) { break; } - feeder->_start++; + state->_start++; } // iterate from end of document hash table to front and skip all documents // that are either deleted or empty - while (feeder->_end > feeder->_start) { - document = (TRI_doc_mptr_t*) *(feeder->_end - 1); + while (state->_end > state->_start) { + document = (TRI_doc_mptr_t*) *(state->_end - 1); if (document != NULL && !document->_deletion) { break; } - feeder->_end--; + state->_end--; } - - feeder->rewind(feeder); } //////////////////////////////////////////////////////////////////////////////// -/// @brief rewind select data feeder +/// @brief rewind table scan data feeder //////////////////////////////////////////////////////////////////////////////// -static void RewindFeeder (TRI_data_feeder_t* feeder) { - feeder->_current = feeder->_start; +static void RewindFeederTableScan (TRI_data_feeder_t* feeder) { + TRI_data_feeder_table_scan_t* state; + + state = (TRI_data_feeder_table_scan_t*) feeder->_state; + state->_current = state->_start; } //////////////////////////////////////////////////////////////////////////////// -/// @brief get current item from data feeder and advance next pointer +/// @brief get current item from table scan data feeder and advance next pointer //////////////////////////////////////////////////////////////////////////////// -static TRI_doc_mptr_t* CurrentFeeder (TRI_data_feeder_t* feeder) { +static bool CurrentFeederTableScan (TRI_data_feeder_t* feeder) { TRI_doc_mptr_t* document; + TRI_data_feeder_table_scan_t* state; + TRI_join_part_t* part; + + state = (TRI_data_feeder_table_scan_t*) feeder->_state; + part = (TRI_join_part_t*) feeder->_part; - while (feeder->_current < feeder->_end) { - document = (TRI_doc_mptr_t*) *(feeder->_current); - feeder->_current++; + while (state->_current < state->_end) { + document = (TRI_doc_mptr_t*) *(state->_current); + + state->_current++; if (document && document->_deletion == 0) { - return document; + part->_singleDocument = document; + return true; } } + + part->_singleDocument = NULL; - return NULL; + return false; } //////////////////////////////////////////////////////////////////////////////// -/// @brief check if data feeder is at eof +/// @brief check if table scan data feeder is at eof //////////////////////////////////////////////////////////////////////////////// -bool EofFeeder (TRI_data_feeder_t* feeder) { - return (feeder->_current < feeder->_end); +static bool EofFeederTableScan (TRI_data_feeder_t* feeder) { + TRI_data_feeder_table_scan_t* state; + + state = (TRI_data_feeder_table_scan_t*) feeder->_state; + return (state->_current < state->_end); } //////////////////////////////////////////////////////////////////////////////// -/// @brief free select data feeder +/// @brief free table scan data feeder //////////////////////////////////////////////////////////////////////////////// -static void FreeFeeder (TRI_data_feeder_t* feeder) { +static void FreeFeederTableScan (TRI_data_feeder_t* feeder) { + TRI_data_feeder_table_scan_t* state; + + state = (TRI_data_feeder_table_scan_t*) feeder->_state; + + if (state) { + TRI_Free(state); + } + + if (feeder->_ranges) { + TRI_DestroyVectorPointer(feeder->_ranges); + TRI_Free(feeder->_ranges); + } + + TRI_Free(feeder); } //////////////////////////////////////////////////////////////////////////////// -/// @brief Create a new data feeder +/// @brief create a new table scan data feeder //////////////////////////////////////////////////////////////////////////////// -TRI_data_feeder_t* TRI_CreateDataFeeder (const TRI_doc_collection_t* collection) { +TRI_data_feeder_t* TRI_CreateDataFeederTableScan (const TRI_doc_collection_t* collection, + TRI_join_t* join, + size_t level) { TRI_data_feeder_t* feeder; - feeder = (TRI_data_feeder_t*) TRI_Allocate(sizeof(TRI_data_feeder_t)); + feeder = CreateDataFeeder(FEEDER_TABLE_SCAN, collection, join, level); if (!feeder) { return NULL; } - feeder->_collection = collection; + feeder->_state = (TRI_data_feeder_table_scan_t*) + TRI_Allocate(sizeof(TRI_data_feeder_table_scan_t)); - feeder->init = InitFeeder; - feeder->rewind = RewindFeeder; - feeder->current = CurrentFeeder; - feeder->eof = EofFeeder; - feeder->free = FreeFeeder; + if (!feeder->_state) { + TRI_Free(feeder); + return NULL; + } - feeder->init(feeder); + feeder->init = InitFeederTableScan; + feeder->rewind = RewindFeederTableScan; + feeder->current = CurrentFeederTableScan; + feeder->eof = EofFeederTableScan; + feeder->free = FreeFeederTableScan; return feeder; } +// ----------------------------------------------------------------------------- +// --SECTION-- primary index +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief init primary index data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void InitFeederPrimaryLookup (TRI_data_feeder_t* feeder) { + QL_optimize_range_t* range; + TRI_vector_string_t parts; + TRI_data_feeder_primary_lookup_t* state; + TRI_string_buffer_t* buffer; + + state = (TRI_data_feeder_primary_lookup_t*) feeder->_state; + state->_isEmpty = true; + state->_context = NULL; + + assert(feeder->_ranges); + assert(feeder->_ranges->_length == 1); + + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[0]; + + if (range->_valueType == RANGE_TYPE_FIELD) { + // ref access + feeder->_accessType = ACCESS_REF; + + buffer = (TRI_string_buffer_t*) TRI_Allocate(sizeof(TRI_string_buffer_t)); + if (!buffer) { + return; + } + + TRI_AppendStringStringBuffer(buffer, "(function($) { return ["); + TRI_AppendStringStringBuffer(buffer, "$['"); + TRI_AppendStringStringBuffer(buffer, range->_refValue._collection); + TRI_AppendStringStringBuffer(buffer, "']."); + TRI_AppendStringStringBuffer(buffer, range->_refValue._field); + TRI_AppendStringStringBuffer(buffer, "] })"); + state->_context = TRI_CreateExecutionContext(buffer->_buffer); + + TRI_FreeStringBuffer(buffer); + TRI_Free(buffer); + + if (!state->_context) { + return; + } + state->_isEmpty = false; + } + if (range->_valueType == RANGE_TYPE_STRING) { + // const access + feeder->_accessType = ACCESS_CONST; + parts = TRI_SplitString(range->_minValue._stringValue, ':'); + if (parts._length > 0) { + if (TRI_UInt64String(parts._buffer[0]) == + ((TRI_collection_t*) feeder->_collection)->_cid) { + state->_didValue = TRI_UInt64String(parts._buffer[1]); + state->_isEmpty = false; + } + } + TRI_DestroyVectorString(&parts); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief rewind primary index data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void RewindFeederPrimaryLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_primary_lookup_t* state; + TRI_vector_string_t parts; + TRI_json_t* parameters; + TRI_json_t* value; + + state = (TRI_data_feeder_primary_lookup_t*) feeder->_state; + state->_hasCompared = true; + + if (feeder->_accessType == ACCESS_REF) { + if (!state->_context) { + return; + } + + parameters = TRI_CreateListJson(); + if (!parameters) { + return; + } + TRI_DefineWhereExecutionContext(state->_context, + (TRI_join_t*) feeder->_join, + feeder->_level, + true); + if (TRI_ExecuteRefExecutionContext (state->_context, parameters)) { + if (parameters->_type != TRI_JSON_LIST) { + TRI_FreeJson(parameters); + return; + } + if (parameters->_value._objects._length != 1) { + TRI_FreeJson(parameters); + return; + } + + value = TRI_AtVector(¶meters->_value._objects, 0); + parts = TRI_SplitString(value->_value._string.data, ':'); + if (parts._length == 2) { + if (TRI_UInt64String(parts._buffer[0]) == + ((TRI_collection_t*) feeder->_collection)->_cid) { + state->_didValue = TRI_UInt64String(parts._buffer[1]); + } + } + TRI_DestroyVectorString(&parts); + } + TRI_FreeJson(parameters); + } + + state->_hasCompared = false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get current item from primary index feeder +//////////////////////////////////////////////////////////////////////////////// + +static bool CurrentFeederPrimaryLookup (TRI_data_feeder_t* feeder) { + TRI_sim_collection_t* collection; + QL_optimize_range_t* range; + TRI_data_feeder_primary_lookup_t* state; + TRI_join_part_t* part; + + state = (TRI_data_feeder_primary_lookup_t*) feeder->_state; + part = (TRI_join_part_t*) feeder->_part; + + if (state->_hasCompared || state->_isEmpty) { + part->_singleDocument = NULL; + return false; + } + + state->_hasCompared = true; + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[0]; + collection = (TRI_sim_collection_t*) feeder->_collection; + part->_singleDocument = (TRI_doc_mptr_t*) + TRI_LookupByKeyAssociativePointer(&collection->_primaryIndex, &state->_didValue); + + return (part->_singleDocument != NULL); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief check if primary index data feeder is at eof +//////////////////////////////////////////////////////////////////////////////// + +static bool EofFeederPrimaryLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_primary_lookup_t* state; + + state = (TRI_data_feeder_primary_lookup_t*) feeder->_state; + + return state->_hasCompared; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free primary index data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void FreeFeederPrimaryLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_primary_lookup_t* state; + + state = (TRI_data_feeder_primary_lookup_t*) feeder->_state; + + if (state->_context) { + TRI_FreeExecutionContext(state->_context); + } + + if (state) { + TRI_Free(state); + } + + if (feeder->_ranges) { + TRI_DestroyVectorPointer(feeder->_ranges); + TRI_Free(feeder->_ranges); + } + + if (feeder) { + TRI_Free(feeder); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create a new primary index data feeder +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederPrimaryLookup (const TRI_doc_collection_t* collection, + TRI_join_t* join, + size_t level) { + TRI_data_feeder_t* feeder; + + feeder = CreateDataFeeder(FEEDER_PRIMARY_LOOKUP, collection, join, level); + if (!feeder) { + return NULL; + } + + feeder->_state = (TRI_data_feeder_primary_lookup_t*) + TRI_Allocate(sizeof(TRI_data_feeder_primary_lookup_t)); + if (!feeder->_state) { + TRI_Free(feeder); + return NULL; + } + + // init feeder + feeder->init = InitFeederPrimaryLookup; + feeder->rewind = RewindFeederPrimaryLookup; + feeder->current = CurrentFeederPrimaryLookup; + feeder->eof = EofFeederPrimaryLookup; + feeder->free = FreeFeederPrimaryLookup; + + return feeder; +} + +// ----------------------------------------------------------------------------- +// --SECTION-- hash index +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief init hash lookup data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void InitFeederHashLookup (TRI_data_feeder_t* feeder) { + QL_optimize_range_t* range; + TRI_data_feeder_hash_lookup_t* state; + TRI_json_t* parameters; + TRI_json_t* doc; + TRI_string_buffer_t* buffer; + size_t i; + + state = (TRI_data_feeder_hash_lookup_t*) feeder->_state; + state->_isEmpty = true; + state->_context = NULL; + state->_position = 0; + + state->_hashElements = NULL; + state->_index = TRI_IndexSimCollection((TRI_sim_collection_t*) feeder->_collection, + feeder->_indexId); + if (!state->_index) { + return; + } + assert(feeder->_ranges); + assert(feeder->_ranges->_length >= 1); + + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[0]; + if (range->_valueType == RANGE_TYPE_FIELD) { + // ref access + feeder->_accessType = ACCESS_REF; + buffer = (TRI_string_buffer_t*) TRI_Allocate(sizeof(TRI_string_buffer_t)); + if (!buffer) { + return; + } + + TRI_AppendStringStringBuffer(buffer, "(function($) { return ["); + for (i = 0; i < feeder->_ranges->_length; i++) { + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[i]; + if (i > 0) { + TRI_AppendCharStringBuffer(buffer, ','); + } + TRI_AppendStringStringBuffer(buffer, "$['"); + TRI_AppendStringStringBuffer(buffer, range->_refValue._collection); + TRI_AppendStringStringBuffer(buffer, "']."); + TRI_AppendStringStringBuffer(buffer, range->_refValue._field); + } + TRI_AppendStringStringBuffer(buffer, "] })"); + state->_context = TRI_CreateExecutionContext(buffer->_buffer); + + TRI_FreeStringBuffer(buffer); + TRI_Free(buffer); + + if (!state->_context) { + return; + } + } + else { + // const access + feeder->_accessType = ACCESS_CONST; + + parameters = TRI_CreateListJson(); + if (!parameters) { + return; + } + for (i = 0; i < feeder->_ranges->_length; i++) { + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[i]; + if (range->_valueType == RANGE_TYPE_STRING) { + TRI_PushBack2ListJson(parameters, + TRI_CreateStringCopyJson(range->_minValue._stringValue)); + } + else if (range->_valueType == RANGE_TYPE_DOUBLE) { + TRI_PushBack2ListJson(parameters, + TRI_CreateNumberJson(range->_minValue._doubleValue)); + } + else if (range->_valueType == RANGE_TYPE_JSON) { + doc = TRI_JsonString(range->_minValue._stringValue); + if (!doc) { + TRI_FreeJson(parameters); + return; + } + TRI_PushBackListJson(parameters, doc); + } + } + state->_hashElements = TRI_LookupHashIndex(state->_index, parameters); + TRI_FreeJson(parameters); + } + + state->_isEmpty = false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief rewind hash lookup data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void RewindFeederHashLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_hash_lookup_t* state; + TRI_json_t* parameters; + + state = (TRI_data_feeder_hash_lookup_t*) feeder->_state; + state->_position = 0; + + if (feeder->_accessType == ACCESS_REF) { + if (state->_hashElements) { + TRI_Free(state->_hashElements->_elements); + TRI_Free(state->_hashElements); + } + state->_hashElements = NULL; + + if (!state->_context) { + return; + } + parameters = TRI_CreateListJson(); + if (!parameters) { + return; + } + TRI_DefineWhereExecutionContext(state->_context, + (TRI_join_t*) feeder->_join, + feeder->_level, + true); + if (TRI_ExecuteRefExecutionContext (state->_context, parameters)) { + state->_hashElements = TRI_LookupHashIndex(state->_index, parameters); + } + + TRI_FreeJson(parameters); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get current item from hash lookup feeder +//////////////////////////////////////////////////////////////////////////////// + +static bool CurrentFeederHashLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_hash_lookup_t* state; + TRI_doc_mptr_t* document; + TRI_join_part_t* part; + + state = (TRI_data_feeder_hash_lookup_t*) feeder->_state; + part = (TRI_join_part_t*) feeder->_part; + + if (state->_isEmpty || !state->_hashElements) { + part->_singleDocument = NULL; + return false; + } + + while (state->_position < state->_hashElements->_numElements) { + document = (TRI_doc_mptr_t*) ((state->_hashElements->_elements[state->_position++]).data); + if (document && !document->_deletion) { + part->_singleDocument = document; + return true; + } + } + + part->_singleDocument = NULL; + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief check if hash lookup data feeder is at eof +//////////////////////////////////////////////////////////////////////////////// + +static bool EofFeederHashLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_hash_lookup_t* state; + + state = (TRI_data_feeder_hash_lookup_t*) feeder->_state; + if (state->_isEmpty || + !state->_hashElements || + state->_position >= state->_hashElements->_numElements) { + return true; + } + + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free hash lookup data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void FreeFeederHashLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_hash_lookup_t* state; + + state = (TRI_data_feeder_hash_lookup_t*) feeder->_state; + if (state->_hashElements) { + TRI_Free(state->_hashElements->_elements); + TRI_Free(state->_hashElements); + } + + if (state->_context) { + TRI_FreeExecutionContext(state->_context); + } + + if (state) { + TRI_Free(state); + } + + if (feeder->_ranges) { + TRI_DestroyVectorPointer(feeder->_ranges); + TRI_Free(feeder->_ranges); + } + + if (feeder) { + TRI_Free(feeder); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder for hash lookups +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederHashLookup (const TRI_doc_collection_t* collection, + TRI_join_t* join, + size_t level) { + TRI_data_feeder_t* feeder; + + feeder = CreateDataFeeder(FEEDER_HASH_LOOKUP, collection, join, level); + if (!feeder) { + return NULL; + } + + feeder->_state = (TRI_data_feeder_hash_lookup_t*) + TRI_Allocate(sizeof(TRI_data_feeder_hash_lookup_t)); + if (!feeder->_state) { + TRI_Free(feeder); + return NULL; + } + + feeder->init = InitFeederHashLookup; + feeder->rewind = RewindFeederHashLookup; + feeder->current = CurrentFeederHashLookup; + feeder->eof = EofFeederHashLookup; + feeder->free = FreeFeederHashLookup; + + return feeder; +} + +// ----------------------------------------------------------------------------- +// --SECTION-- skiplists +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free skiplist index elements +//////////////////////////////////////////////////////////////////////////////// + +static void FreeSkiplistElements (SkiplistIndexElements* elements) { + TRI_Free(elements->_elements); + TRI_Free(elements); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief init skiplist data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void InitFeederSkiplistLookup (TRI_data_feeder_t* feeder) { + QL_optimize_range_t* range; + TRI_data_feeder_skiplist_lookup_t* state; + TRI_json_t* parameters; + TRI_json_t* doc; + TRI_string_buffer_t* buffer; + size_t i; + + state = (TRI_data_feeder_skiplist_lookup_t*) feeder->_state; + state->_isEmpty = true; + state->_context = NULL; + state->_position = 0; + + state->_skiplistElements = NULL; + state->_index = TRI_IndexSimCollection((TRI_sim_collection_t*) feeder->_collection, + feeder->_indexId); + if (!state->_index) { + return; + } + assert(feeder->_ranges); + assert(feeder->_ranges->_length >= 1); + + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[0]; + if (range->_valueType == RANGE_TYPE_FIELD) { + // ref access + feeder->_accessType = ACCESS_REF; + buffer = (TRI_string_buffer_t*) TRI_Allocate(sizeof(TRI_string_buffer_t)); + if (!buffer) { + return; + } + + TRI_AppendStringStringBuffer(buffer, "(function($) { return ["); + for (i = 0; i < feeder->_ranges->_length; i++) { + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[i]; + if (i > 0) { + TRI_AppendCharStringBuffer(buffer, ','); + } + TRI_AppendStringStringBuffer(buffer, "$['"); + TRI_AppendStringStringBuffer(buffer, range->_refValue._collection); + TRI_AppendStringStringBuffer(buffer, "']."); + TRI_AppendStringStringBuffer(buffer, range->_refValue._field); + } + TRI_AppendStringStringBuffer(buffer, "] })"); + state->_context = TRI_CreateExecutionContext(buffer->_buffer); + + TRI_FreeStringBuffer(buffer); + TRI_Free(buffer); + + if (!state->_context) { + return; + } + } + else { + // const access + feeder->_accessType = ACCESS_CONST; + + parameters = TRI_CreateListJson(); + if (!parameters) { + return; + } + for (i = 0; i < feeder->_ranges->_length; i++) { + range = (QL_optimize_range_t*) feeder->_ranges->_buffer[i]; + if (range->_valueType == RANGE_TYPE_STRING) { + TRI_PushBack2ListJson(parameters, + TRI_CreateStringCopyJson(range->_minValue._stringValue)); + } + else if (range->_valueType == RANGE_TYPE_DOUBLE) { + TRI_PushBack2ListJson(parameters, + TRI_CreateNumberJson(range->_minValue._doubleValue)); + } + else if (range->_valueType == RANGE_TYPE_JSON) { + doc = TRI_JsonString(range->_minValue._stringValue); + if (!doc) { + TRI_FreeJson(parameters); + return; + } + TRI_PushBackListJson(parameters, doc); + } + } + state->_skiplistElements = TRI_LookupSkiplistIndex(state->_index, parameters); + TRI_FreeJson(parameters); + } + + state->_isEmpty = false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief rewind skiplist data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void RewindFeederSkiplistLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_skiplist_lookup_t* state; + TRI_json_t* parameters; + + state = (TRI_data_feeder_skiplist_lookup_t*) feeder->_state; + state->_position = 0; + + if (feeder->_accessType == ACCESS_REF) { + if (state->_skiplistElements) { + FreeSkiplistElements(state->_skiplistElements); + } + state->_skiplistElements = NULL; + + if (!state->_context) { + return; + } + parameters = TRI_CreateListJson(); + if (!parameters) { + return; + } + TRI_DefineWhereExecutionContext(state->_context, + (TRI_join_t*) feeder->_join, + feeder->_level, + true); + if (TRI_ExecuteRefExecutionContext (state->_context, parameters)) { + state->_skiplistElements = TRI_LookupSkiplistIndex(state->_index, parameters); + } + + TRI_FreeJson(parameters); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get current item from skiplist feeder +//////////////////////////////////////////////////////////////////////////////// + +static bool CurrentFeederSkiplistLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_skiplist_lookup_t* state; + TRI_doc_mptr_t* document; + TRI_join_part_t* part; + + state = (TRI_data_feeder_skiplist_lookup_t*) feeder->_state; + part = (TRI_join_part_t*) feeder->_part; + + if (state->_isEmpty || !state->_skiplistElements) { + part->_singleDocument = NULL; + return false; + } + + while (state->_position < state->_skiplistElements->_numElements) { + document = (TRI_doc_mptr_t*) ((state->_skiplistElements->_elements[state->_position++]).data); + if (document && !document->_deletion) { + part->_singleDocument = document; + return true; + } + } + + part->_singleDocument = NULL; + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief check if skiplist data feeder is at eof +//////////////////////////////////////////////////////////////////////////////// + +static bool EofFeederSkiplistLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_skiplist_lookup_t* state; + + state = (TRI_data_feeder_skiplist_lookup_t*) feeder->_state; + if (state->_isEmpty || + !state->_skiplistElements || + state->_position >= state->_skiplistElements->_numElements) { + return true; + } + + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free skiplist lookup data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void FreeFeederSkiplistLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_skiplist_lookup_t* state; + + state = (TRI_data_feeder_skiplist_lookup_t*) feeder->_state; + if (state->_skiplistElements) { + FreeSkiplistElements(state->_skiplistElements); + } + + if (state->_context) { + TRI_FreeExecutionContext(state->_context); + } + + if (state) { + TRI_Free(state); + } + + if (feeder->_ranges) { + TRI_DestroyVectorPointer(feeder->_ranges); + TRI_Free(feeder->_ranges); + } + + if (feeder) { + TRI_Free(feeder); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder for skiplist lookups +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederSkiplistLookup (const TRI_doc_collection_t* collection, + TRI_join_t* join, + size_t level) { + TRI_data_feeder_t* feeder; + + printf("SKIPLISTS ARE YET UNSUPPORTED. TERMINATING\n"); + exit(1); + feeder = CreateDataFeeder(FEEDER_SKIPLIST_LOOKUP, collection, join, level); + if (!feeder) { + return NULL; + } + + feeder->_state = (TRI_data_feeder_skiplist_lookup_t*) + TRI_Allocate(sizeof(TRI_data_feeder_skiplist_lookup_t)); + if (!feeder->_state) { + TRI_Free(feeder); + return NULL; + } + + feeder->init = InitFeederSkiplistLookup; + feeder->rewind = RewindFeederSkiplistLookup; + feeder->current = CurrentFeederSkiplistLookup; + feeder->eof = EofFeederSkiplistLookup; + feeder->free = FreeFeederSkiplistLookup; + + return feeder; +} + +// ----------------------------------------------------------------------------- +// --SECTION-- geo index +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief init geo index data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void InitFeederGeoLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_geo_lookup_t* state; + + state = (TRI_data_feeder_geo_lookup_t*) feeder->_state; + state->_isEmpty = true; + state->_position = 0; + state->_coordinates = NULL; + + state->_index = TRI_IndexSimCollection((TRI_sim_collection_t*) feeder->_collection, + feeder->_indexId); + if (!state->_index) { + return; + } + if (!state->_restriction) { + return; + } + + state->_isEmpty = false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief rewind geo index data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void RewindFeederGeoLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_geo_lookup_t* state; + + state = (TRI_data_feeder_geo_lookup_t*) feeder->_state; + state->_position = 0; + + if (state->_restriction->_type == RESTRICT_WITHIN) { + state->_coordinates = TRI_WithinGeoIndex(state->_index, + state->_restriction->_lat, + state->_restriction->_lon, + state->_restriction->_arg._radius); + } + else { + state->_coordinates = TRI_NearestGeoIndex(state->_index, + state->_restriction->_lat, + state->_restriction->_lon, + state->_restriction->_arg._numDocuments); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get current item from geo index feeder +//////////////////////////////////////////////////////////////////////////////// + +static bool CurrentFeederGeoLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_geo_lookup_t* state; + TRI_doc_mptr_t* document; + TRI_join_part_t* part; + size_t position; + + state = (TRI_data_feeder_geo_lookup_t*) feeder->_state; + part = (TRI_join_part_t*) feeder->_part; + + if (state->_isEmpty || !state->_coordinates) { + part->_singleDocument = NULL; + part->_extraData._singleValue = NULL; + return false; + } + + while (state->_position < state->_coordinates->length) { + position = state->_position++; + document = (TRI_doc_mptr_t*) ((state->_coordinates->coordinates[position].data)); + if (document && !document->_deletion) { + part->_singleDocument = document; + // store extra data + part->_extraData._singleValue = &state->_coordinates->distances[position]; + + return true; + } + } + + part->_singleDocument = NULL; + part->_extraData._singleValue = NULL; + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief check if geo index data feeder is at eof +//////////////////////////////////////////////////////////////////////////////// + +static bool EofFeederGeoLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_geo_lookup_t* state; + + state = (TRI_data_feeder_geo_lookup_t*) feeder->_state; + if (state->_isEmpty || + !state->_coordinates || + state->_position >= state->_coordinates->length) { + return true; + } + + return false; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free geo index data feeder +//////////////////////////////////////////////////////////////////////////////// + +static void FreeFeederGeoLookup (TRI_data_feeder_t* feeder) { + TRI_data_feeder_geo_lookup_t* state; + + state = (TRI_data_feeder_geo_lookup_t*) feeder->_state; + if (state->_coordinates) { + GeoIndex_CoordinatesFree(state->_coordinates); + } + + if (state) { + TRI_Free(state); + } + + if (feeder) { + TRI_Free(feeder); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder for geo lookups +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederGeoLookup (const TRI_doc_collection_t* collection, + TRI_join_t* join, + size_t level, + QL_ast_query_geo_restriction_t* restriction) { + TRI_data_feeder_t* feeder; + TRI_data_feeder_geo_lookup_t* state; + + feeder = CreateDataFeeder(FEEDER_GEO_LOOKUP, collection, join, level); + if (!feeder) { + return NULL; + } + + feeder->_state = (TRI_data_feeder_geo_lookup_t*) + TRI_Allocate(sizeof(TRI_data_feeder_geo_lookup_t)); + + state = (TRI_data_feeder_geo_lookup_t*) feeder->_state; + + if (!state) { + TRI_Free(feeder); + return NULL; + } + + state->_restriction = restriction; + + feeder->init = InitFeederGeoLookup; + feeder->rewind = RewindFeederGeoLookup; + feeder->current = CurrentFeederGeoLookup; + feeder->eof = EofFeederGeoLookup; + feeder->free = FreeFeederGeoLookup; + + return feeder; +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/VocBase/data-feeder.h b/VocBase/data-feeder.h index 6a3270621b..f7597c8a42 100644 --- a/VocBase/data-feeder.h +++ b/VocBase/data-feeder.h @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief data feeder for selects +/// @brief data feeders for selects /// /// @file /// @@ -28,52 +28,379 @@ #ifndef TRIAGENS_DURHAM_VOC_BASE_DATA_FEEDER_H #define TRIAGENS_DURHAM_VOC_BASE_DATA_FEEDER_H 1 +#include +#include +#include + #include "VocBase/simple-collection.h" #include "VocBase/result.h" +#include "VocBase/context.h" +#include "QL/ast-query.h" #ifdef __cplusplus extern "C" { #endif +// ----------------------------------------------------------------------------- +// --SECTION-- documentation +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @page IndexUsage Index usage +/// +/// When executing a query, the database will automatically check if it can use +/// an index to speed up the query. It will check all available indexes for the +/// collections used in the query and will picks the ones that are (most) +/// appropriate. This process is called index selection. +/// +/// The index selection is done for each collection used in a query. If a +/// collection is used multiple times in a query (e.g. +/// @LIT{users u1 INNER JOIN users u2 ON (u1.id == u2.id)}, then there will be +/// a separate index selection per collection instance. +/// +/// @section IndexRequirement Requirements +/// +/// Which index is used depends on which indexes are available for the collections +/// used and what is contained in the query's WHERE and JOIN conditions. +/// +/// An index can only be used if the WHERE/JOIN conditions refer to indexed +/// attributes. It depends on the index type what kinds of comparisons are allowed +/// in order to use the index. For example, the primary index and hash indexes +/// only support equality comparisons whereas other index types might allow +/// range queries as well. It also depends on the index type whether just a +/// subset of the indexed attributes is sufficient in order to use an index. +/// +/// The query optimizer needs to detect that an index can actually be used, and +/// it will only allow using indexes if the indexed attributes are not used in +/// combination with logical @LIT{||} or logical @LIT{!}. Furthermore, the +/// optimizer currently cannot make use of indexes if the same attribute is +/// compared to multiple values at the same time (i.e. a so-called in-list +/// comparison). For example, the following condition would not allow to use +/// an index: @LIT{WHERE users.id == 3 || users.id == 4 || users.id == 9} +/// +/// There is no way to explicitly specify which index to use/prefer/reject in a +/// query as there sometimes is in other database products. +/// +/// @section IndexTypes Index types +/// +/// There are the following index types: +/// - primary index (automatically created for the "_id" attribute of a collection) +/// - hash index (used-defined index on one or many attributes of a collection) +/// - geo index (user-defined index on two attributes of a collection) +/// +/// @subsection PrimaryIndex Primary index +/// +/// The collection's primary index will only be used to access the documents of a +/// collection if the WHERE/JOIN condition for the collection contains an equality +/// predicate for the @LIT{_id} attribute. The compare value must either be a +/// string constant (e.g. @LIT{u._id == "345055525:346693925"} or a reference to +/// another attribute (e.g. @LIT{u._id == x.value}. +/// +/// A collection's primary index will not be used for any comparison other than +/// equality comparisons or for multi-attribute predicates. +/// +/// @subsection HashIndex Hash index +/// +/// Hash indexes for collections can be used if all of the indexed attributes are +/// specified in the WHERE/JOIN condition. It is not sufficient to use just a subset +/// of the indexed attributes in a query. The condition for each attribute must +/// also be an equality predicate. The compare value must be a string or numeric +/// constant or a reference to another attribute. +/// +/// Provided there is an index on @LIT{u.first} and @LIT{u.last}, the index could +/// be used for the following predicates: +/// - @LIT{u.first == 'Jack' && u.last == 'Sparrow'} +/// - @LIT{u.last == 'Sparrow' && u.first == 'Jack'} +/// +/// A hash index will not be used for any comparison other than equality comparsions +/// or for conditions that do not contain all indexed attributes. +/// +/// @subsection GeoIndex Geo index +/// +/// Geo indexes are automatically used when a geo restriction is specified for a +/// collection in the FROM clause of a query. Geo indexes are ignored for all other +/// conditions specified in the ON or WHERE clauses of a query. +/// +/// @section IndexPreference Index preference +/// +/// As mentioned before, The index selection process will pick the most appropriate +/// index for each collection. The definition of "appropriate" in this context is: +/// +/// - If a geo restriction is specified for a collection, the most appropriate geo +/// index for the collection will be used. If there is no geo index defined for +/// the collection, the query will fail. +/// - If no geo restriction is specified and the primary index can be used, the +/// primary index will be used. The reason for this is that the primary index is +/// unique and guaranteed to return at most one document. +/// Furthermore, the primary index is present in memory anyway and access to it is +/// fast. +/// - If the primary index cannot be used, all candidate hash indexes will be +/// checked. If there are multiple candidate, the hash index with the most +/// attributes indexes is picked. The assumption behind this is that the more +/// attributes are indexed, the less selective the index is expected to be and +/// the less documents it is supposed to return for each compare value. If there +/// is only one candidate hash index, it will be used. +/// - If no index can be used to access the documents in a collection, a full +/// collection scan will be done. +/// +//////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// /// @addtogroup VocBase /// @{ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @brief data feeder for selects +/// @brief forward declaration to resolve header inclusion issues +//////////////////////////////////////////////////////////////////////////////// + +typedef void TRI_join_t; + +typedef void TRI_part_t; + +// ----------------------------------------------------------------------------- +// --SECTION-- general feeder attributes +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief data feeder access types /// -/// A data feeder is used to access the documents in a collection sequentially. -/// The documents are accessed in order of definition in the collection's hash -/// table. The hash table might also contain empty entries (nil pointers) or -/// deleted documents. The data feeder abstracts all this and provides easy -/// access to all (relevant) documents in the hash table. -/// For each collection in a join, one data feeder will be used. If a collection +/// - ACCESS_ALL: full table scan, no index used +/// - ACCESS_CONST: index usage, index is queried with const value(s) +/// - ACCESS_REF: index usage, index is queried with values from other tables +//////////////////////////////////////////////////////////////////////////////// + +typedef enum { + ACCESS_ALL = 1, + ACCESS_CONST = 1, + ACCESS_REF = 2 +} +TRI_index_access_type_e; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief data feeder types +//////////////////////////////////////////////////////////////////////////////// + +typedef enum { + FEEDER_TABLE_SCAN = 1, + FEEDER_PRIMARY_LOOKUP = 2, + FEEDER_HASH_LOOKUP = 3, + FEEDER_SKIPLIST_LOOKUP = 4, + FEEDER_GEO_LOOKUP = 5 +} +TRI_data_feeder_type_e; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief general data feeder interface (used by all variants) +/// +/// A data feeder is a means of accessing the documents in a collection in a +/// select query. +/// +/// For each collection in a query, one data feeder will be used. If a collection /// is invoked multiple times in a select (e.g. A INNER JOIN A) then there will /// be multiple data feeders (in this case for collection A). This is because /// the data feeder also contains state information (current position) that is -/// distinct for multiple instances in the same join +/// distinct for multiple instances of one collection in the same join. +/// +/// The data feeder's internal state depends on the data feeder type (@ref +/// TRI_data_feeder_type_e). +/// +/// Index-based data feeders might access the index values using constants or +/// references to other fields. Using constants (e.g. a.id == 5) is of course +/// the fastest way because the compare value is constant for the complete join +/// process. The compare value can be set up once at the start and will simply +/// be reused. +/// If the compare value is not constant but a reference to another field +/// (e.g. a.id == b.id), then the compare value is dynamic and will be determined +/// by a Javascript function for each iteration. The Javascript function is +/// set up once only. +/// +/// Data feeders are first initialized by calling their init() function. This +/// function must set up all internal structures. Const access data feeders +/// can initialize their compare value(s) with the constants here already so +/// they do not need to be initialized in each join comparison. Ref access data +/// feeders can initialize their Javascript function here. +/// +/// The rewind() function will be called at the start of the join execution to +/// reset the data feeder position to the beginning of the data. The rewind +/// function is called multiple times for inner collections in a join (once for +/// each combination of documents in outer scope). +/// +/// The current() function is called during join execution to return the current +/// document. It might return a nil pointer if there are no more documents. +/// The current() function is expected to move the position pointer forward by +/// one document. +/// +/// The eof() function is used to check if there are more documents available. +/// +/// The free() function is finally called after join processing is done and is +/// expected to free all internal structures. //////////////////////////////////////////////////////////////////////////////// typedef struct TRI_data_feeder_s { + TRI_data_feeder_type_e _type; + TRI_index_access_type_e _accessType; + TRI_idx_iid_t _indexId; + TRI_vector_pointer_t* _ranges; + TRI_join_t* _join; + TRI_part_t* _part; + size_t _level; + void* _state; const TRI_doc_collection_t* _collection; - void **_start; - void **_end; - void **_current; void (*init) (struct TRI_data_feeder_s*); void (*rewind) (struct TRI_data_feeder_s*); - TRI_doc_mptr_t* (*current) (struct TRI_data_feeder_s*); + bool (*current) (struct TRI_data_feeder_s*); bool (*eof) (struct TRI_data_feeder_s*); void (*free) (struct TRI_data_feeder_s*); } TRI_data_feeder_t; +// ----------------------------------------------------------------------------- +// --SECTION-- table scan +// ----------------------------------------------------------------------------- + //////////////////////////////////////////////////////////////////////////////// -/// @brief Create a new data feeder +/// @brief internals/guts of table scan data feeder +/// +/// A table scanner is used to access the documents in a collection sequentially. +/// The documents are accessed in order of definition in the collection's hash +/// table. The hash table might also contain empty entries (nil pointers) or +/// deleted documents. The data feeder abstracts all this and provides easy +/// access to all (relevant) documents in the hash table. +/// +/// The table scanner does not have any other internal state than positioning +/// information. As it will return all documents anyway, it does not have any +/// distinction between const and ref access types. //////////////////////////////////////////////////////////////////////////////// -TRI_data_feeder_t* TRI_CreateDataFeeder(const TRI_doc_collection_t*); +typedef struct TRI_data_feeder_table_scan_s { + void **_start; + void **_end; + void **_current; +} +TRI_data_feeder_table_scan_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder (table scan) +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederTableScan (const TRI_doc_collection_t*, + TRI_join_t*, + size_t); + +// ----------------------------------------------------------------------------- +// --SECTION-- primary index +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief internals/guts of primary index data feeder +/// +/// The primary index data feeder will always use the (unique) primary index of +/// a collection to find exactly one (or zero) documents. It supports const and +/// ref access. +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_data_feeder_primary_lookup_s { + bool _hasCompared; + bool _isEmpty; + TRI_voc_did_t _didValue; + TRI_js_exec_context_t _context; +} +TRI_data_feeder_primary_lookup_t; + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder (primary index lookup) +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederPrimaryLookup (const TRI_doc_collection_t*, + TRI_join_t*, + size_t); + +// ----------------------------------------------------------------------------- +// --SECTION-- hash index +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief internals/guts of hash lookup data feeder +/// +/// The hash index data feeder will use a unique or non-unique hash index +/// defined for a collection. It will return any documents available in the hash +/// for the compare values. It supports const and ref access. +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_data_feeder_hash_lookup_s { + bool _isEmpty; + TRI_index_t* _index; + HashIndexElements* _hashElements; + TRI_js_exec_context_t _context; + size_t _position; +} +TRI_data_feeder_hash_lookup_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder (hash index lookup) +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederHashLookup (const TRI_doc_collection_t*, + TRI_join_t*, + size_t); + +// ----------------------------------------------------------------------------- +// --SECTION-- skiplists +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief internals/guts of skiplist data feeder +/// +/// The skiplist data feeder will use a unique or non-unique skiplist +/// defined for a collection. It will return any documents available in the list +/// for the compare values. It supports const and ref access. +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_data_feeder_skiplist_lookup_s { + bool _isEmpty; + TRI_index_t* _index; + SkiplistIndexElements* _skiplistElements; + TRI_js_exec_context_t _context; + size_t _position; +} +TRI_data_feeder_skiplist_lookup_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder (skiplist lookup) +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederSkiplistLookup (const TRI_doc_collection_t*, + TRI_join_t*, + size_t); + +// ----------------------------------------------------------------------------- +// --SECTION-- geo index +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief internals/guts of geo index data feeder +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_data_feeder_geo_lookup_s { + bool _isEmpty; + TRI_index_t* _index; + QL_ast_query_geo_restriction_t* _restriction; + GeoCoordinates* _coordinates; + size_t _position; +} +TRI_data_feeder_geo_lookup_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a new data feeder (geo index lookup) +//////////////////////////////////////////////////////////////////////////////// + +TRI_data_feeder_t* TRI_CreateDataFeederGeoLookup (const TRI_doc_collection_t*, + TRI_join_t*, + size_t, + QL_ast_query_geo_restriction_t*); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/VocBase/datafile.c b/VocBase/datafile.c index 36ecf3e7e2..4d6e326179 100644 --- a/VocBase/datafile.c +++ b/VocBase/datafile.c @@ -34,7 +34,7 @@ #include #include -#define DEBUG_DATAFILE 1 +// #define DEBUG_DATAFILE 1 // ----------------------------------------------------------------------------- // --SECTION-- private functions @@ -303,6 +303,9 @@ static TRI_datafile_t* OpenDatafile (char const* filename, bool ignoreErrors) { // create datafile structure datafile = TRI_Allocate(sizeof(TRI_datafile_t)); + if (!datafile) { + // TODO: FIXME + } InitDatafile(datafile, TRI_DuplicateString(filename), @@ -408,6 +411,9 @@ TRI_datafile_t* TRI_CreateDatafile (char const* filename, TRI_voc_size_t maximal // create datafile structure datafile = TRI_Allocate(sizeof(TRI_datafile_t)); + if (!datafile) { + // TODO: FIXME + } InitDatafile(datafile, TRI_DuplicateString(filename), diff --git a/VocBase/document-collection.c b/VocBase/document-collection.c index bb8f52f7a8..c8f7d62f95 100644 --- a/VocBase/document-collection.c +++ b/VocBase/document-collection.c @@ -155,6 +155,9 @@ static TRI_doc_collection_info_t* Figures (TRI_doc_collection_t* document) { size_t i; info = TRI_Allocate(sizeof(TRI_doc_collection_info_t)); + if (!info) { + return NULL; + } info->_numberDatafiles = document->_datafileInfo._nrUsed; @@ -219,6 +222,10 @@ TRI_datafile_t* CreateJournalDocCollection (TRI_doc_collection_t* collection, bo // construct a suitable filename number = TRI_StringUInt32(TRI_NewTickVocBase()); + if (number == NULL) { + LOG_ERROR("out of memory when creating journal number"); + return NULL; + } if (compactor) { jname = TRI_Concatenate3String("journal-", number, ".db"); @@ -227,7 +234,19 @@ TRI_datafile_t* CreateJournalDocCollection (TRI_doc_collection_t* collection, bo jname = TRI_Concatenate3String("compactor-", number, ".db"); } + if (jname == NULL) { + TRI_FreeString(number); + LOG_ERROR("out of memory when creating journal name"); + return NULL; + } + filename = TRI_Concatenate2File(collection->base._directory, jname); + if (filename == NULL) { + TRI_FreeString(number); + TRI_FreeString(jname); + LOG_ERROR("out of memory when creating journal filename"); + return NULL; + } TRI_FreeString(number); TRI_FreeString(jname); @@ -357,8 +376,23 @@ bool CloseJournalDocCollection (TRI_doc_collection_t* collection, } number = TRI_StringUInt32(journal->_fid); + if (!number) { + return false; + } + dname = TRI_Concatenate3String("datafile-", number, ".db"); + if (!dname) { + TRI_FreeString(number); + return false; + } + filename = TRI_Concatenate2File(collection->base._directory, dname); + if (!filename) { + TRI_FreeString(number); + TRI_FreeString(dname); + return false; + } + TRI_FreeString(dname); TRI_FreeString(number); @@ -367,9 +401,11 @@ bool CloseJournalDocCollection (TRI_doc_collection_t* collection, if (! ok) { TRI_RemoveVectorPointer(vector, position); TRI_PushBackVectorPointer(&collection->base._datafiles, journal); + TRI_FreeString(filename); return false; } + TRI_FreeString(filename); LOG_TRACE("closed journal '%s'", journal->_filename); @@ -410,7 +446,7 @@ void TRI_InitDocCollection (TRI_doc_collection_t* collection, collection->figures = Figures; - TRI_InitRSContainer(&collection->_resultSets, collection); + TRI_InitBarrierList(&collection->_barrierList, collection); TRI_InitAssociativePointer(&collection->_datafileInfo, HashKeyDatafile, @@ -429,7 +465,7 @@ void TRI_DestroyDocCollection (TRI_doc_collection_t* collection) { } TRI_DestroyAssociativePointer(&collection->_datafileInfo); - TRI_DestroyRSContainer(&collection->_resultSets); + TRI_DestroyBarrierList(&collection->_barrierList); TRI_DestroyCollection(&collection->base); } @@ -466,6 +502,9 @@ TRI_doc_datafile_info_t* TRI_FindDatafileInfoDocCollection (TRI_doc_collection_t } dfi = TRI_Allocate(sizeof(TRI_doc_datafile_info_t)); + if (!dfi) { + return NULL; + } dfi->_fid = fid; diff --git a/VocBase/document-collection.h b/VocBase/document-collection.h index 5daff3828c..4364eed0df 100644 --- a/VocBase/document-collection.h +++ b/VocBase/document-collection.h @@ -32,7 +32,7 @@ #include "BasicsC/json.h" #include "ShapedJson/json-shaper.h" -#include "VocBase/result-set.h" +#include "VocBase/barrier.h" #ifdef __cplusplus extern "C" { @@ -239,7 +239,7 @@ typedef struct TRI_doc_collection_s { TRI_collection_t base; TRI_shaper_t* _shaper; - TRI_rs_container_t _resultSets; + TRI_barrier_list_t _barrierList; TRI_associative_pointer_t _datafileInfo; bool (*beginRead) (struct TRI_doc_collection_s*); diff --git a/VocBase/fluent-query.c b/VocBase/fluent-query.c deleted file mode 100644 index c7475bdc54..0000000000 --- a/VocBase/fluent-query.c +++ /dev/null @@ -1,2878 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief fluent query -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2011 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -/// @author Copyright 2011, triagens GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#include "fluent-query.h" - -#include "BasicsC/conversions.h" -#include "BasicsC/logging.h" -#include "BasicsC/string-buffer.h" -#include "BasicsC/strings.h" -#include "ShapedJson/shape-accessor.h" -#include "ShapedJson/shaped-json.h" -#include "VocBase/index.h" -#include "VocBase/simple-collection.h" -#include "VocBase/voc-shaper.h" - -// ----------------------------------------------------------------------------- -// --SECTION-- forward declarations -// ----------------------------------------------------------------------------- - -static void ExecuteDocumentQueryPrimary (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result); - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees the old storage of a TRI_fluent_query_result_t -/// -/// Note the augument json objects are not freed. -//////////////////////////////////////////////////////////////////////////////// - -static void FreeDocuments (TRI_fluent_query_result_t* result) { - if (result->_documents != NULL) { - TRI_Free(result->_documents); - result->_documents = NULL; - } - - if (result->_augmented != NULL) { - TRI_Free(result->_augmented); - result->_augmented = NULL; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees the augument json objects -//////////////////////////////////////////////////////////////////////////////// - -static void FreeAugmented (TRI_fluent_query_result_t* result) { - TRI_json_t* ptr; - TRI_json_t* end; - - if (result->_augmented != NULL) { - ptr = result->_augmented; - end = result->_augmented + result->_length; - - for (; ptr < end; ++ptr) { - TRI_DestroyJson(ptr); - } - - result->_augmented = NULL; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a TRI_fluent_query_t -//////////////////////////////////////////////////////////////////////////////// - -static void CloneQuery (TRI_fluent_query_t* dst, TRI_fluent_query_t* src) { - dst->_type = src->_type; - dst->_collection = src->_collection; - dst->_isOptimised = src->_isOptimised; - - dst->optimise = src->optimise; - dst->execute = src->execute; - dst->json = src->json; - dst->stringify = src->stringify; - dst->clone = src->clone; - dst->free = src->free; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- COLLECTION QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a full scan -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseCollectionQuery (TRI_fluent_query_t** qry) { - TRI_document_query_t* query; - TRI_col_type_e type; - - // extract query - query = (TRI_document_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - type = query->base._collection->_collection->base._type; - - if (type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { - return TRI_DuplicateString("cannot handle collection type"); - } - - // nothing to optimise - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a full scan -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteCollectionQuery (TRI_fluent_query_t* qry, TRI_fluent_query_result_t* result) { - TRI_doc_mptr_t const** qtr; - TRI_document_query_t* query; - TRI_sim_collection_t* collection; - size_t total; - void** end; - void** ptr; - - // extract query and document - query = (TRI_document_query_t*) qry; - collection = (TRI_sim_collection_t*) query->base._collection->_collection; - - // append information about the execution plan - TRI_AppendString(&result->_cursor, ">collection"); - - // free any old storage - FreeAugmented(result); - FreeDocuments(result); - - // add a new document list and copy all documents - result->_total = result->_length = 0; - - if (collection->_primaryIndex._nrUsed == 0) { - return; - } - - result->_documents = (qtr = TRI_Allocate(sizeof(TRI_doc_mptr_t*) * (collection->_primaryIndex._nrUsed))); - - ptr = collection->_primaryIndex._table; - end = collection->_primaryIndex._table + collection->_primaryIndex._nrAlloc; - - for (total = 0; ptr < end; ++ptr) { - ++result->_scannedDocuments; - - if (*ptr) { - TRI_doc_mptr_t* d = *ptr; - - if (d->_deletion == 0) { - ++result->_matchedDocuments; - *qtr++ = *ptr; - total++; - } - } - } - - result->_total = result->_length = total; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a full scan -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonCollectionQuery (TRI_fluent_query_t* qry) { - TRI_document_query_t* query; - TRI_json_t* json; - - query = (TRI_document_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("collection")); - TRI_Insert2ArrayJson(json, "collection", TRI_CreateStringCopyJson(query->base._collection->_name)); - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a full scan -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyCollectionQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_document_query_t* query; - - query = (TRI_document_query_t*) qry; - - TRI_AppendStringStringBuffer(buffer, "collection(\""); - TRI_AppendStringStringBuffer(buffer, query->base._collection->_name); - TRI_AppendStringStringBuffer(buffer, "\")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a full scan -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneCollectionQuery (TRI_fluent_query_t* qry) { - TRI_collection_query_t* clone; - - clone = TRI_Allocate(sizeof(TRI_collection_query_t)); - - CloneQuery(&clone->base, qry); - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a full scan -//////////////////////////////////////////////////////////////////////////////// - -static void FreeCollectionQuery (TRI_fluent_query_t* query, bool descend) { - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- DISTANCE QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a distance query -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseDistanceQuery (TRI_fluent_query_t** qry) { - TRI_distance_query_t* query; - TRI_fluent_query_t* operand; - char* e; - - query = (TRI_distance_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - operand = query->_operand; - - // ............................................................................. - // operand is a NEAR - // ............................................................................. - - if (operand->_type == TRI_QUE_TYPE_NEAR) { - TRI_near_query_t* near; - - near = (TRI_near_query_t*) operand; - - near->_distance = TRI_DuplicateString(query->_distance); - near->base._isOptimised = false; - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &near->base; - - // recure - return (*qry)->optimise(qry); - } - - // ............................................................................. - // operand is a WITHIN - // ............................................................................. - - else if (operand->_type == TRI_QUE_TYPE_WITHIN) { - TRI_within_query_t* within; - - within = (TRI_within_query_t*) operand; - - within->_distance = TRI_DuplicateString(query->_distance); - within->base._isOptimised = false; - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &within->base; - - // recure - return (*qry)->optimise(qry); - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a distance query -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteDistanceQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - TRI_distance_query_t* query; - - query = (TRI_distance_query_t*) qry; - - query->_operand->execute(query->_operand, result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a distance query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonDistanceQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_distance_query_t* query; - - query = (TRI_distance_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("distance")); - TRI_Insert2ArrayJson(json, "distance", TRI_CreateStringCopyJson(query->_distance)); - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a distance query -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyDistanceQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_distance_query_t* query; - - query = (TRI_distance_query_t*) qry; - - query->_operand->stringify(query->_operand, buffer); - - TRI_AppendStringStringBuffer(buffer, ".distance("); - TRI_AppendStringStringBuffer(buffer, query->_distance); - TRI_AppendStringStringBuffer(buffer, ")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a distance query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneDistanceQuery (TRI_fluent_query_t* qry) { - TRI_distance_query_t* clone; - TRI_distance_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_distance_query_t)); - query = (TRI_distance_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand->clone(query->_operand); - clone->_distance = TRI_DuplicateString(query->_distance); - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a distance query -//////////////////////////////////////////////////////////////////////////////// - -static void FreeDistanceQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_distance_query_t* query; - - query = (TRI_distance_query_t*) qry; - - if (descend) { - query->_operand->free(query->_operand, descend); - } - - TRI_FreeString(query->_distance); - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- DOCUMENT QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a document lookup -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseDocumentQuery (TRI_fluent_query_t** qry) { - TRI_document_query_t* query; - TRI_col_type_e type; - char* e; - - query = (TRI_document_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // underlying query is a collection, use the primary index - if (query->_operand != NULL && query->_operand->_type == TRI_QUE_TYPE_COLLECTION) { - type = query->base._collection->_collection->base._type; - - if (type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { - return TRI_DuplicateString("cannot handle collection type"); - } - - query->_operand->free(query->_operand, true); - query->_operand = NULL; - - query->base.execute = ExecuteDocumentQueryPrimary; - } - - // optimise operand - else { - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a document lookup as primary index lookup -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteDocumentQueryPrimary (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - TRI_doc_mptr_t const* document; - TRI_document_query_t* query; - TRI_vocbase_col_t const* collection; - - query = (TRI_document_query_t*) qry; - - // look up the document - collection = query->base._collection; - document = collection->_collection->read(collection->_collection, query->_did); - - // append information about the execution plan - TRI_AppendString(&result->_cursor, ">primary"); - - ++result->_scannedIndexEntries; - - // free any old storage - FreeAugmented(result); - FreeDocuments(result); - - // the document is the result - if (document == NULL) { - result->_total = result->_length = 0; - } - else { - result->_total = result->_length = 1; - - ++result->_matchedDocuments; - - result->_documents = TRI_Allocate(sizeof(TRI_doc_mptr_t*)); - *result->_documents = document; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a document lookup as full scan -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteDocumentQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - TRI_doc_mptr_t const** end; - TRI_doc_mptr_t const** ptr; - TRI_doc_mptr_t const* found; - TRI_document_query_t* query; - TRI_json_t aug; - size_t pos; - - // get the result set of the underlying query - query = (TRI_document_query_t*) qry; - - // execute the sub-query - query->_operand->execute(query->_operand, result); - - if (result->_error) { - return; - } - - // append information about the execution plan - TRI_AppendString(&result->_cursor, ">full-scan[document]"); - - // without any document there will be no match - if (result->_length == 0) { - return; - } - - // do a full scan - pos = 0; - ptr = result->_documents; - end = result->_documents + result->_length; - - for (; ptr < end; ++ptr, ++pos) { - ++result->_scannedDocuments; - - // found a match, create new result - if ((*ptr)->_did == query->_did) { - ++result->_matchedDocuments; - - if (result->_length == 1) { - return; - } - - found = *ptr; - TRI_Free(result->_documents); - result->_documents = TRI_Allocate(sizeof(TRI_doc_mptr_t*)); - - result->_total = result->_length = 1; - *result->_documents = found; - - if (result->_augmented != NULL) { - TRI_CopyToJson(&aug, &result->_augmented[pos]); - - FreeAugmented(result); - result->_augmented = TRI_Allocate(sizeof(TRI_json_t)); - - result->_augmented[0] = aug; - } - - return; - } - } - - // nothing found - result->_total = result->_length = 0; - - FreeAugmented(result); - FreeDocuments(result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a document lookup -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonDocumentQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_document_query_t* query; - - query = (TRI_document_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("document")); - TRI_Insert2ArrayJson(json, "identfier", TRI_CreateNumberJson(query->_did)); - - if (query->_operand == NULL) { - TRI_Insert2ArrayJson(json, "collection", TRI_CreateStringCopyJson(query->base._collection->_name)); - } - else { - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - } - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a document lookup -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyDocumentQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_document_query_t* query; - - query = (TRI_document_query_t*) qry; - - if (query->_operand == NULL) { - TRI_AppendStringStringBuffer(buffer, "collection(\""); - TRI_AppendStringStringBuffer(buffer, query->base._collection->_name); - TRI_AppendStringStringBuffer(buffer, "\")"); - } - else { - query->_operand->stringify(query->_operand, buffer); - } - - TRI_AppendStringStringBuffer(buffer, ".document("); - TRI_AppendUInt64StringBuffer(buffer, query->_did); - TRI_AppendStringStringBuffer(buffer, ")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a document lookup -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneDocumentQuery (TRI_fluent_query_t* qry) { - TRI_document_query_t* clone; - TRI_document_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_document_query_t)); - query = (TRI_document_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand == NULL ? NULL : query->_operand->clone(query->_operand); - clone->_did = query->_did; - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a document lookup -//////////////////////////////////////////////////////////////////////////////// - -static void FreeDocumentQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_document_query_t* query; - - query = (TRI_document_query_t*) qry; - - if (descend) { - if (query->_operand != NULL) { - query->_operand->free(query->_operand, descend); - } - } - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- EDGES QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises an edges lookup -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseEdgesQuery (TRI_fluent_query_t** qry) { - TRI_edges_query_t* query; - char* e; - - query = (TRI_edges_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - if (query->base._collection->_type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { - return TRI_DuplicateString("cannot handle collection type"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes an edges lookup -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteEdgesQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - TRI_edges_query_t* query; - TRI_sim_collection_t* edgesCollection; - TRI_vector_pointer_t v; - size_t i; - size_t j; - - query = (TRI_edges_query_t*) qry; - - // execute the sub-query - query->_operand->execute(query->_operand, result); - - if (result->_error) { - return; - } - - TRI_AppendString(&result->_cursor, ">edges"); - - // without any documents there will be no edges - if (result->_length == 0) { - return; - } - - // create a vector for the result - TRI_InitVectorPointer(&v); - - edgesCollection = (TRI_sim_collection_t*) query->base._collection->_collection; - - // for each document get the edges - for (i = 0; i < result->_length; ++i) { - TRI_doc_mptr_t const* mptr; - TRI_vector_pointer_t edges; - - mptr = result->_documents[i]; - edges = TRI_LookupEdgesSimCollection(edgesCollection, - query->_direction, - query->_operand->_collection->_cid, - mptr->_did); - - for (j = 0; j < edges._length; ++j) { - TRI_PushBackVectorPointer(&v, edges._buffer[j]); - } - - TRI_DestroyVectorPointer(&edges); - } - - // free any old results - FreeAugmented(result); - FreeDocuments(result); - - result->_documents = (TRI_doc_mptr_t const**) v._buffer; - result->_total = result->_length = v._length; - result->_scannedDocuments += v._length; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of an edges lookup -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonEdgesQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_edges_query_t* query; - - query = (TRI_edges_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("edges")); - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - TRI_Insert2ArrayJson(json, "direction", TRI_CreateNumberJson(query->_direction)); - TRI_Insert2ArrayJson(json, "edge-collection", TRI_CreateNumberJson(query->base._collection->_cid)); - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of an edges lookup -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyEdgesQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_edges_query_t* query; - - query = (TRI_edges_query_t*) qry; - - switch (query->_direction) { - case TRI_EDGE_IN: - TRI_AppendStringStringBuffer(buffer, "inEdges(\""); - break; - - case TRI_EDGE_OUT: - TRI_AppendStringStringBuffer(buffer, "outEdges(\""); - break; - - case TRI_EDGE_ANY: - TRI_AppendStringStringBuffer(buffer, "edges(\""); - break; - - case TRI_EDGE_UNUSED: - TRI_AppendStringStringBuffer(buffer, "nonEdges(\""); - break; - } - - TRI_AppendUInt64StringBuffer(buffer, query->base._collection->_cid); - - TRI_AppendStringStringBuffer(buffer, "\")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones an edges lookup -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneEdgesQuery (TRI_fluent_query_t* qry) { - TRI_edges_query_t* clone; - TRI_edges_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_edges_query_t)); - query = (TRI_edges_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand == NULL ? NULL : query->_operand->clone(query->_operand); - clone->_direction = query->_direction; - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a edges lookup -//////////////////////////////////////////////////////////////////////////////// - -static void FreeEdgesQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_edges_query_t* query; - - query = (TRI_edges_query_t*) qry; - - if (descend) { - if (query->_operand != NULL) { - query->_operand->free(query->_operand, descend); - } - } - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- GEO INDEX QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a geo-spatial hint -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseGeoIndexQuery (TRI_fluent_query_t** qry) { - TRI_geo_index_query_t* query; - char* e; - - query = (TRI_geo_index_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a geo-spatial hint -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteGeoIndexQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - TRI_geo_index_query_t* query; - - query = (TRI_geo_index_query_t*) qry; - - query->_operand->execute(query->_operand, result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a geo-spatial hint -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonGeoIndexQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_geo_index_query_t* query; - - query = (TRI_geo_index_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("geo")); - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - - if (query->_location != NULL) { - TRI_Insert2ArrayJson(json, "location", TRI_CreateStringCopyJson(query->_location)); - TRI_Insert2ArrayJson(json, "geoJson", TRI_CreateBooleanJson(query->_geoJson)); - } - else if (query->_latitude != NULL && query->_longitude != NULL) { - TRI_Insert2ArrayJson(json, "latitude", TRI_CreateStringCopyJson(query->_latitude)); - TRI_Insert2ArrayJson(json, "longitude", TRI_CreateStringCopyJson(query->_longitude)); - } - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a geo-spatial hint -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyGeoIndexQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_geo_index_query_t* query; - - query = (TRI_geo_index_query_t*) qry; - - query->_operand->stringify(query->_operand, buffer); - - TRI_AppendStringStringBuffer(buffer, ".geo("); - - if (query->_location != NULL) { - TRI_AppendStringStringBuffer(buffer, query->_location); - TRI_AppendStringStringBuffer(buffer, ","); - TRI_AppendStringStringBuffer(buffer, query->_geoJson ? "true" : "false"); - } - else if (query->_latitude != NULL && query->_longitude != NULL) { - TRI_AppendStringStringBuffer(buffer, query->_latitude); - TRI_AppendStringStringBuffer(buffer, ","); - TRI_AppendStringStringBuffer(buffer, query->_longitude); - } - - TRI_AppendStringStringBuffer(buffer, ")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a geo-spatial hint -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneGeoIndexQuery (TRI_fluent_query_t* qry) { - TRI_geo_index_query_t* clone; - TRI_geo_index_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_geo_index_query_t)); - query = (TRI_geo_index_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand->clone(query->_operand); - - clone->_location = query->_location == NULL ? NULL : TRI_DuplicateString(query->_location); - clone->_latitude = query->_latitude == NULL ? NULL : TRI_DuplicateString(query->_latitude); - clone->_longitude = query->_longitude == NULL ? NULL : TRI_DuplicateString(query->_longitude); - - clone->_geoJson = query->_geoJson; - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a geo-spatial hint -//////////////////////////////////////////////////////////////////////////////// - -static void FreeGeoIndeyQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_geo_index_query_t* query; - - query = (TRI_geo_index_query_t*) qry; - - if (descend) { - query->_operand->free(query->_operand, descend); - } - - if (query->_location != NULL) { TRI_Free(query->_location); } - if (query->_latitude != NULL) { TRI_Free(query->_latitude); } - if (query->_longitude != NULL) { TRI_Free(query->_longitude); } - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- LIMIT QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a limit query -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseLimitQuery (TRI_fluent_query_t** qry) { - TRI_limit_query_t* query; - TRI_fluent_query_t* operand; - char* e; - - query = (TRI_limit_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - operand = query->_operand; - - // ............................................................................. - // operand is a NEAR - // ............................................................................. - - if (0 <= query->_limit && operand->_type == TRI_QUE_TYPE_NEAR) { - TRI_near_query_t* near; - - near = (TRI_near_query_t*) operand; - - // no limit specified, that the limit - if (near->_limit < 0) { - near->_limit = query->_limit; - near->base._isOptimised = false; - } - - // modify near query - else if (query->_limit < near->_limit) { - near->_limit = query->_limit; - near->base._isOptimised = false; - } - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &near->base; - - // recure - return (*qry)->optimise(qry); - } - - // ............................................................................. - // operand is a LIMIT - // ............................................................................. - - else if (operand->_type == TRI_QUE_TYPE_LIMIT) { - TRI_limit_query_t* op; - - op = (TRI_limit_query_t*) operand; - - // both limits are positive, use minimum - if (query->_limit >= 0 && op->_limit >= 0) { - if (query->_limit < op->_limit) { - op->_limit = query->_limit; - op->base._isOptimised = false; - } - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &op->base; - - // recure - return (*qry)->optimise(qry); - } - - // both limits are negative, use maximum - else if (query->_limit <= 0 && op->_limit <= 0) { - if (query->_limit > op->_limit) { - op->_limit = query->_limit; - op->base._isOptimised = false; - } - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &op->base; - - // recure - return (*qry)->optimise(qry); - } - - // operand has a smaller limit, forget query - else if (labs(op->_limit) <= labs(query->_limit)) { - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &op->base; - - return (*qry)->optimise(qry); - } - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a limit query -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteLimitQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - TRI_doc_mptr_t const** copy; - TRI_json_t* aug = NULL; - TRI_limit_query_t* query; - TRI_voc_size_t limit; - TRI_voc_size_t offset; - - query = (TRI_limit_query_t*) qry; - - // execute the sub-query - query->_operand->execute(query->_operand, result); - - if (result->_error) { - return; - } - - // append information about the execution plan - TRI_AppendString(&result->_cursor, ">limit"); - - // without any documents there will be no limit - if (result->_length == 0) { - return; - } - - // get the last "limit" documents - if (query->_limit < 0) { - limit = -query->_limit; - - if (result->_length < limit) { - offset = 0; - } - else { - offset = result->_length - limit; - } - } - - // get the first "limit" documents - else { - limit = query->_limit; - offset = 0; - } - - // not enough documents to limit query - if (result->_length <= limit) { - result->_matchedDocuments += result->_length; - return; - } - - // shorten result list - result->_matchedDocuments += limit; - - copy = TRI_Allocate(sizeof(TRI_doc_mptr_t*) * limit); - memcpy(copy, result->_documents + offset, sizeof(TRI_doc_mptr_t*) * limit); - - if (result->_augmented != NULL) { - aug = TRI_Allocate(sizeof(TRI_json_t) * limit); - memcpy(aug, result->_augmented + offset, sizeof(TRI_json_t) * limit); - } - - result->_length = limit; - - TRI_Free(result->_documents); - result->_documents = copy; - - if (result->_augmented != NULL) { - TRI_Free(result->_augmented); - result->_augmented = aug; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a limit query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonLimitQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_limit_query_t* query; - - query = (TRI_limit_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("limit")); - TRI_Insert2ArrayJson(json, "limit", TRI_CreateNumberJson(query->_limit)); - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a limit query -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyLimitQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_limit_query_t* query; - - query = (TRI_limit_query_t*) qry; - - query->_operand->stringify(query->_operand, buffer); - - TRI_AppendStringStringBuffer(buffer, ".limit("); - TRI_AppendInt64StringBuffer(buffer, query->_limit); - TRI_AppendStringStringBuffer(buffer, ")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a limit query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneLimitQuery (TRI_fluent_query_t* qry) { - TRI_limit_query_t* clone; - TRI_limit_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_limit_query_t)); - query = (TRI_limit_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand->clone(query->_operand); - clone->_limit = query->_limit; - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a limit query -//////////////////////////////////////////////////////////////////////////////// - -static void FreeLimitQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_limit_query_t* query; - - query = (TRI_limit_query_t*) qry; - - if (descend) { - query->_operand->free(query->_operand, descend); - } - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- NEAR QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private types -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -typedef struct { - double _distance; - void const* _data; -} -geo_coordinate_distance_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief locates a suitable geo index -//////////////////////////////////////////////////////////////////////////////// - -static TRI_geo_index_t* LocateGeoIndex (TRI_fluent_query_t* query) { - TRI_col_type_e type; - TRI_index_t* idx2; - TRI_index_t* idx; - TRI_sim_collection_t* collection; - size_t i; - - // sanity check - if (! query->_collection->_loaded) { - return NULL; - } - - type = query->_collection->_collection->base._type; - - if (type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { - return NULL; - } - - collection = (TRI_sim_collection_t*) query->_collection->_collection; - - // return the geo index - idx = NULL; - - for (i = 0; i < collection->_indexes._length; ++i) { - idx2 = collection->_indexes._buffer[i]; - - if (idx2->_type == TRI_IDX_TYPE_GEO_INDEX) { - if (idx == NULL) { - idx = idx2; - } - else if (idx2->_iid < idx->_iid) { - idx = idx2; - } - } - } - - return (TRI_geo_index_t*) idx; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief sorts geo coordinates -//////////////////////////////////////////////////////////////////////////////// - -static int CompareGeoCoordinateDistance (geo_coordinate_distance_t* left, geo_coordinate_distance_t* right) { - if (left->_distance < right->_distance) { - return -1; - } - else if (left->_distance > right->_distance) { - return 1; - } - else { - return 0; - } -} - -#define FSRT_NAME SortGeoCoordinates -#define FSRT_TYPE geo_coordinate_distance_t - -#define FSRT_COMP(l,r,s) CompareGeoCoordinateDistance(l,r) - -uint32_t FSRT_Rand = 0; - -static uint32_t RandomGeoCoordinateDistance (void) { - return (FSRT_Rand = FSRT_Rand * 31415 + 27818); -} - -#define FSRT__RAND \ - ((fs_b) + FSRT__UNIT * (RandomGeoCoordinateDistance() % FSRT__DIST(fs_e,fs_b,FSRT__SIZE))) - -#include - -//////////////////////////////////////////////////////////////////////////////// -/// @brief uses a specific geo-spatial index -//////////////////////////////////////////////////////////////////////////////// - -static TRI_geo_index_t* LookupGeoIndex (TRI_geo_index_query_t* query) { - TRI_col_type_e type; - TRI_doc_collection_t* collection; - TRI_index_t* idx; - TRI_shape_pid_t lat = 0; - TRI_shape_pid_t loc = 0; - TRI_shape_pid_t lon = 0; - TRI_shaper_t* shaper; - TRI_sim_collection_t* sim; - - // lookup an geo index - collection = query->base._collection->_collection; - - type = collection->base._type; - - if (type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { - LOG_ERROR("cannot handle collection type %ld", collection->base._type); - return NULL; - } - - sim = (TRI_sim_collection_t*) collection; - - shaper = query->base._collection->_collection->_shaper; - - if (query->_location != NULL) { - loc = shaper->findAttributePathByName(shaper, query->_location); - } - - if (query->_latitude != NULL) { - lat = shaper->findAttributePathByName(shaper, query->_latitude); - } - - if (query->_longitude != NULL) { - lon = shaper->findAttributePathByName(shaper, query->_longitude); - } - - if (query->_location != NULL) { - idx = TRI_LookupGeoIndexSimCollection(sim, loc, query->_geoJson); - } - else if (query->_longitude != NULL && query->_latitude != NULL) { - idx = TRI_LookupGeoIndex2SimCollection(sim, lat, lon); - } - else { - idx = NULL; - } - - return (TRI_geo_index_t*) idx; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief create result -//////////////////////////////////////////////////////////////////////////////// - -static void GeoResult (GeoCoordinates* cors, - char const* distance, - TRI_fluent_query_result_t* result) { - GeoCoordinate* end; - GeoCoordinate* ptr; - TRI_doc_mptr_t const** wtr; - double* dtr; - geo_coordinate_distance_t* gnd; - geo_coordinate_distance_t* gtr; - geo_coordinate_distance_t* tmp; - size_t n; - - if (cors == NULL) { - result->_error = TRI_DuplicateString("cannot execute geo index search"); - return; - } - - // sort the result - n = cors->length; - - gtr = (tmp = TRI_Allocate(sizeof(geo_coordinate_distance_t) * n)); - gnd = tmp + n; - - ptr = cors->coordinates; - end = cors->coordinates + n; - - dtr = cors->distances; - - for (; ptr < end; ++ptr, ++dtr, ++gtr) { - gtr->_distance = *dtr; - gtr->_data = ptr->data; - } - - GeoIndex_CoordinatesFree(cors); - - SortGeoCoordinates(tmp, gnd); - - // copy the documents - result->_documents = (TRI_doc_mptr_t const**) (wtr = TRI_Allocate(sizeof(TRI_doc_mptr_t*) * n)); - - for (gtr = tmp; gtr < gnd; ++gtr, ++wtr) { - *wtr = gtr->_data; - } - - // copy the distance - if (distance != NULL) { - TRI_json_t* atr; - - result->_augmented = (atr = TRI_Allocate(sizeof(TRI_json_t) * n)); - - for (gtr = tmp; gtr < gnd; ++gtr, ++atr) { - atr->_type = TRI_JSON_ARRAY; - TRI_InitVector(&atr->_value._objects, sizeof(TRI_json_t)); - - TRI_InsertArrayJson(atr, distance, TRI_CreateNumberJson(gtr->_distance)); - } - } - - TRI_Free(tmp); - - result->_total = result->_length = n; - result->_scannedIndexEntries += n; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a near query -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseNearQuery (TRI_fluent_query_t** qry) { - TRI_near_query_t* query; - char* e; - - query = (TRI_near_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a near query -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteNearQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - static size_t const DEFAULT_LIMIT = 100; - - GeoCoordinates* cors; - TRI_geo_index_t* idx; - TRI_near_query_t* query; - TRI_fluent_query_t* operand; - - query = (TRI_near_query_t*) qry; - operand = query->_operand; - - // free any old results - FreeAugmented(result); - FreeDocuments(result); - - // we need a suitable geo index - if (operand->_type == TRI_QUE_TYPE_GEO_INDEX) { - TRI_geo_index_query_t* geo; - - geo = (TRI_geo_index_query_t*) operand; - - idx = LookupGeoIndex(geo); - operand = geo->_operand; - } - else { - idx = LocateGeoIndex(&query->base); - } - - if (idx == NULL) { - result->_error = TRI_DuplicateString("cannot locate suitable geo index"); - return; - } - - // sub-query must be the collection - if (operand->_type != TRI_QUE_TYPE_COLLECTION) { - result->_error = TRI_DuplicateString("near query can only be executed for the complete collection"); - return; - } - - // append information about the execution plan - TRI_AppendString(&result->_cursor, ">near"); - - // execute geo search - if (query->_limit < 0) { - cors = TRI_NearestGeoIndex(&idx->base, query->_latitude, query->_longitude, DEFAULT_LIMIT); - } - else { - cors = TRI_NearestGeoIndex(&idx->base, query->_latitude, query->_longitude, query->_limit); - } - - // and append result - GeoResult(cors, query->_distance, result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a near lookup -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonNearQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_near_query_t* query; - - query = (TRI_near_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("near")); - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - TRI_Insert2ArrayJson(json, "latitude", TRI_CreateNumberJson(query->_latitude)); - TRI_Insert2ArrayJson(json, "longitude", TRI_CreateNumberJson(query->_longitude)); - TRI_Insert2ArrayJson(json, "limit", TRI_CreateNumberJson(query->_limit)); - - if (query->_distance != NULL) { - TRI_Insert2ArrayJson(json, "distance", TRI_CreateStringCopyJson(query->_distance)); - } - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a near query -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyNearQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_near_query_t* query; - - query = (TRI_near_query_t*) qry; - - query->_operand->stringify(query->_operand, buffer); - - TRI_AppendStringStringBuffer(buffer, ".near("); - TRI_AppendDoubleStringBuffer(buffer, query->_latitude); - TRI_AppendStringStringBuffer(buffer, ","); - TRI_AppendDoubleStringBuffer(buffer, query->_longitude); - TRI_AppendStringStringBuffer(buffer, ")"); - - if (query->_distance != NULL) { - TRI_AppendStringStringBuffer(buffer, ".distance("); - TRI_AppendStringStringBuffer(buffer, query->_distance); - TRI_AppendStringStringBuffer(buffer, ")"); - } - - if (0 <= query->_limit) { - TRI_AppendStringStringBuffer(buffer, ".limit("); - TRI_AppendUInt64StringBuffer(buffer, query->_limit); - TRI_AppendStringStringBuffer(buffer, ")"); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a near query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneNearQuery (TRI_fluent_query_t* qry) { - TRI_near_query_t* clone; - TRI_near_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_near_query_t)); - query = (TRI_near_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand->clone(query->_operand); - clone->_latitude = query->_latitude; - clone->_longitude = query->_longitude; - clone->_limit = query->_limit; - clone->_distance = query->_distance == NULL ? NULL : TRI_DuplicateString(query->_distance); - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a near query -//////////////////////////////////////////////////////////////////////////////// - -static void FreeNearQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_near_query_t* query; - - query = (TRI_near_query_t*) qry; - - if (descend) { - query->_operand->free(query->_operand, descend); - } - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- SELECT BY EXAMPLE QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief checks for match of an example -//////////////////////////////////////////////////////////////////////////////// - -static bool IsExampleMatch (TRI_shaper_t* shaper, - TRI_doc_mptr_t const* doc, - size_t len, - TRI_shape_pid_t* pids, - TRI_shaped_json_t** values) { - TRI_shape_access_t const* accessor; - TRI_shaped_json_t const* document; - TRI_shaped_json_t* example; - TRI_shaped_json_t result; - bool ok; - size_t i; - - document = &doc->_document; - - for (i = 0; i < len; ++i) { - example = values[i]; - accessor = TRI_FindAccessorVocShaper(shaper, document->_sid, pids[i]); - - if (accessor == NULL) { - LOG_TRACE("failed to get accessor for sid %lu and path %lu", - (unsigned long) document->_sid, - (unsigned long) pids[i]); - - return false; - } - - if (accessor->_shape == NULL) { - LOG_TRACE("expecting an array for path %lu", - (unsigned long) pids[i]); - - return false; - } - - if (accessor->_shape->_sid != example->_sid) { - LOG_TRACE("expecting sid %lu for path %lu, got sid %lu", - (unsigned long) example->_sid, - (unsigned long) pids[i], - (unsigned long) accessor->_shape->_sid); - - return false; - } - - ok = TRI_ExecuteShapeAccessor(accessor, document, &result); - - if (! ok) { - LOG_TRACE("failed to get accessor for sid %lu and path %lu", - (unsigned long) document->_sid, - (unsigned long) pids[i]); - - return false; - } - - if (result._data.length != example->_data.length) { - LOG_TRACE("expecting length %lu, got length %lu for path %lu", - (unsigned long) result._data.length, - (unsigned long) example->_data.length, - (unsigned long) pids[i]); - - return false; - } - - if (memcmp(result._data.data, example->_data.data, example->_data.length) != 0) { - LOG_TRACE("data mismatch at path %lu", - (unsigned long) pids[i]); - return false; - } - } - - return true; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a select-by-example query -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseSelectFullQuery (TRI_fluent_query_t** qry) { - TRI_select_full_query_t* query; - char* e; - - query = (TRI_select_full_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a select-by-example query -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteSelectFullQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - union { void* v; void const* c; } cnv; - TRI_select_full_query_t* query; - TRI_vector_pointer_t filtered; - TRI_shaper_t* shaper; - TRI_doc_mptr_t const** ptr; - TRI_doc_mptr_t const** end; - - query = (TRI_select_full_query_t*) qry; - - // execute the sub-query - query->_operand->execute(query->_operand, result); - - if (result->_error) { - return; - } - - TRI_AppendString(&result->_cursor, ">select[full-scan]"); - - // without any document there will be no match - if (result->_length == 0) { - return; - } - - // do a full scan - TRI_InitVectorPointer(&filtered); - - shaper = query->base._collection->_collection->_shaper; - - ptr = result->_documents; - end = result->_documents + result->_length; - - for (; ptr < end; ++ptr) { - ++result->_scannedDocuments; - - if (IsExampleMatch(shaper, *ptr, query->_length, query->_pids, query->_values)) { - ++result->_matchedDocuments; - - cnv.c = *ptr; - TRI_PushBackVectorPointer(&filtered, cnv.v); - } - } - - TRI_Free(result->_documents); - result->_documents = (TRI_doc_mptr_t const**) filtered._buffer; - result->_length = filtered._length; - - if (result->_augmented != NULL) { - TRI_Free(result->_augmented); - result->_augmented = NULL; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a select-by-example query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonSelectFullQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_json_t* example; - TRI_select_full_query_t* query; - TRI_shaper_t* shaper; - size_t i; - - query = (TRI_select_full_query_t*) qry; - json = TRI_CreateArrayJson(); - shaper = query->base._collection->_collection->_shaper; - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("select-full")); - - example = TRI_CreateArrayJson(); - - for (i = 0; i < query->_length; ++i) { - char const* path; - TRI_json_t* value; - - path = TRI_AttributeNameShapePid(shaper, query->_pids[i]); - value = TRI_JsonShapedJson(shaper, query->_values[i]); - - TRI_Insert2ArrayJson(example, path, value); - } - - TRI_Insert2ArrayJson(json, "example", example); - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a select-by-example query -//////////////////////////////////////////////////////////////////////////////// - -static void StringifySelectFullQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_select_full_query_t* query; - - query = (TRI_select_full_query_t*) qry; - - query->_operand->stringify(query->_operand, buffer); - - TRI_AppendStringStringBuffer(buffer, ".select("); - // TODO - TRI_AppendStringStringBuffer(buffer, ")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a select-by-example query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneSelectFullQuery (TRI_fluent_query_t* qry) { - TRI_select_full_query_t* clone; - TRI_select_full_query_t* query; - TRI_shaped_json_t* copy; - size_t n; - size_t i; - - clone = TRI_Allocate(sizeof(TRI_select_full_query_t)); - query = (TRI_select_full_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand->clone(query->_operand); - - n = query->_length; - - clone->_length = n; - clone->_pids = TRI_Allocate(n * sizeof(TRI_shape_pid_t)); - clone->_values = TRI_Allocate(n * sizeof(TRI_shaped_json_t*)); - - for (i = 0; i < n; ++i) { - copy = TRI_Allocate(sizeof(TRI_shaped_json_t)); - copy->_sid = query->_values[i]->_sid; - TRI_CopyToBlob(©->_data, TRI_CopyBlob(&query->_values[i]->_data)); - - clone->_values[i] = copy; - clone->_pids[i] = query->_pids[i]; - } - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a select-by-example query -//////////////////////////////////////////////////////////////////////////////// - -static void FreeSelectFullQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_select_full_query_t* query; - size_t i; - - query = (TRI_select_full_query_t*) qry; - - if (descend) { - query->_operand->free(query->_operand, descend); - } - - for (i = 0; i < query->_length; ++i) { - TRI_FreeShapedJson(query->_values[i]); - } - - TRI_Free(query->_values); - TRI_Free(query->_pids); - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- SKIP QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a skip query -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseSkipQuery (TRI_fluent_query_t** qry) { - TRI_skip_query_t* query; - TRI_fluent_query_t* operand; - char* e; - - query = (TRI_skip_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - operand = query->_operand; - - // ............................................................................. - // no skip at all - // ............................................................................. - - if (query->_skip == 0) { - TRI_skip_query_t* op; - - op = (TRI_skip_query_t*) operand; - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &op->base; - - // done - return NULL; - } - - // ............................................................................. - // operand is a SKIP - // ............................................................................. - - if (operand->_type == TRI_QUE_TYPE_SKIP) { - TRI_skip_query_t* op; - - op = (TRI_skip_query_t*) operand; - - op->_skip = op->_skip + query->_skip; - op->base._isOptimised = false; - - // free the query, but not the operands of the query - query->base.free(&query->base, false); - - // change the query to its operand - *qry = &op->base; - - // recure - return (*qry)->optimise(qry); - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a skip query -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteSkipQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - TRI_doc_mptr_t const** copy; - TRI_json_t* aug = NULL; - TRI_skip_query_t* query; - TRI_voc_size_t newtotal; - - query = (TRI_skip_query_t*) qry; - - // execute the sub-query - query->_operand->execute(query->_operand, result); - - if (result->_error) { - return; - } - - TRI_AppendString(&result->_cursor, ">skip"); - - // no skip at all - if (query->_skip == 0) { - result->_matchedDocuments += result->_length; - return; - } - - // without any documents there will be no skipping - if (result->_length == 0) { - return; - } - - // not enough documents - if (result->_length <= query->_skip) { - result->_length = 0; - - FreeAugmented(result); - FreeDocuments(result); - - return; - } - - // shorten result list - newtotal = (result->_length - query->_skip); - - result->_matchedDocuments += newtotal; - - copy = TRI_Allocate(sizeof(TRI_doc_mptr_t*) * newtotal); - memcpy(copy, result->_documents + query->_skip, sizeof(TRI_doc_mptr_t*) * newtotal); - - if (result->_augmented != NULL) { - aug = TRI_Allocate(sizeof(TRI_json_t) * newtotal); - memcpy(aug, result->_augmented + query->_skip, sizeof(TRI_json_t) * newtotal); - } - - result->_length = newtotal; - - TRI_Free(result->_documents); - result->_documents = copy; - - if (result->_augmented != NULL) { - TRI_Free(result->_augmented); - result->_augmented = aug; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a skip query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonSkipQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_skip_query_t* query; - - query = (TRI_skip_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("skip")); - TRI_Insert2ArrayJson(json, "skip", TRI_CreateNumberJson(query->_skip)); - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a skip query -//////////////////////////////////////////////////////////////////////////////// - -static void StringifySkipQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_skip_query_t* query; - - query = (TRI_skip_query_t*) qry; - - query->_operand->stringify(query->_operand, buffer); - - TRI_AppendStringStringBuffer(buffer, ".skip("); - TRI_AppendUInt64StringBuffer(buffer, query->_skip); - TRI_AppendStringStringBuffer(buffer, ")"); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a skip query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneSkipQuery (TRI_fluent_query_t* qry) { - TRI_skip_query_t* clone; - TRI_skip_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_skip_query_t)); - query = (TRI_skip_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand->clone(query->_operand); - clone->_skip = query->_skip; - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a skip query -//////////////////////////////////////////////////////////////////////////////// - -static void FreeSkipQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_skip_query_t* query; - - query = (TRI_skip_query_t*) qry; - - if (descend) { - query->_operand->free(query->_operand, descend); - } - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- WITHIN QUERY -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief optimises a within query -//////////////////////////////////////////////////////////////////////////////// - -static char* OptimiseWithinQuery (TRI_fluent_query_t** qry) { - TRI_within_query_t* query; - char* e; - - query = (TRI_within_query_t*) *qry; - - // sanity check - if (! query->base._collection->_loaded) { - return TRI_Concatenate3String("collection \"", query->base._collection->_name, "\" not loaded"); - } - - // check if query is already optimised - if (query->base._isOptimised) { - return NULL; - } - - // optimise operand - e = query->_operand->optimise(&query->_operand); - - if (e != NULL) { - return e; - } - - query->base._isOptimised = true; - return NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a within query -//////////////////////////////////////////////////////////////////////////////// - -static void ExecuteWithinQuery (TRI_fluent_query_t* qry, - TRI_fluent_query_result_t* result) { - GeoCoordinates* cors; - TRI_geo_index_t* idx; - TRI_within_query_t* query; - TRI_fluent_query_t* operand; - - query = (TRI_within_query_t*) qry; - operand = query->_operand; - - // free any old results - FreeAugmented(result); - FreeDocuments(result); - - // we need a suitable geo index - if (operand->_type == TRI_QUE_TYPE_GEO_INDEX) { - TRI_geo_index_query_t* geo; - - geo = (TRI_geo_index_query_t*) operand; - - idx = LookupGeoIndex(geo); - operand = geo->_operand; - } - else { - idx = LocateGeoIndex(&query->base); - } - - if (idx == NULL) { - result->_error = TRI_DuplicateString("cannot locate suitable geo index"); - return; - } - - // sub-query must be the collection - if (operand->_type != TRI_QUE_TYPE_COLLECTION) { - result->_error = TRI_DuplicateString("within query can only be executed for the complete collection"); - return; - } - - // append information about the execution plan - TRI_AppendString(&result->_cursor, ">within"); - - // execute geo search - cors = TRI_WithinGeoIndex(&idx->base, query->_latitude, query->_longitude, query->_radius); - - // and create result - GeoResult(cors, query->_distance, result); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief json representation of a within lookup -//////////////////////////////////////////////////////////////////////////////// - -static TRI_json_t* JsonWithinQuery (TRI_fluent_query_t* qry) { - TRI_json_t* json; - TRI_within_query_t* query; - - query = (TRI_within_query_t*) qry; - json = TRI_CreateArrayJson(); - - TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("within")); - TRI_Insert2ArrayJson(json, "operand", query->_operand->json(query->_operand)); - TRI_Insert2ArrayJson(json, "latitude", TRI_CreateNumberJson(query->_latitude)); - TRI_Insert2ArrayJson(json, "longitude", TRI_CreateNumberJson(query->_longitude)); - TRI_Insert2ArrayJson(json, "radius", TRI_CreateNumberJson(query->_radius)); - - if (query->_distance != NULL) { - TRI_Insert2ArrayJson(json, "distance", TRI_CreateStringCopyJson(query->_distance)); - } - - return json; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief appends a string representation of a within query -//////////////////////////////////////////////////////////////////////////////// - -static void StringifyWithinQuery (TRI_fluent_query_t* qry, TRI_string_buffer_t* buffer) { - TRI_within_query_t* query; - - query = (TRI_within_query_t*) qry; - - query->_operand->stringify(query->_operand, buffer); - - TRI_AppendStringStringBuffer(buffer, ".within("); - TRI_AppendDoubleStringBuffer(buffer, query->_latitude); - TRI_AppendStringStringBuffer(buffer, ","); - TRI_AppendDoubleStringBuffer(buffer, query->_longitude); - TRI_AppendStringStringBuffer(buffer, ","); - TRI_AppendDoubleStringBuffer(buffer, query->_radius); - TRI_AppendStringStringBuffer(buffer, ")"); - - if (query->_distance != NULL) { - TRI_AppendStringStringBuffer(buffer, ".distance("); - TRI_AppendStringStringBuffer(buffer, query->_distance); - TRI_AppendStringStringBuffer(buffer, ")"); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief clones a within query -//////////////////////////////////////////////////////////////////////////////// - -static TRI_fluent_query_t* CloneWithinQuery (TRI_fluent_query_t* qry) { - TRI_within_query_t* clone; - TRI_within_query_t* query; - - clone = TRI_Allocate(sizeof(TRI_within_query_t)); - query = (TRI_within_query_t*) qry; - - CloneQuery(&clone->base, &query->base); - - clone->_operand = query->_operand->clone(query->_operand); - clone->_latitude = query->_latitude; - clone->_longitude = query->_longitude; - clone->_radius = query->_radius; - clone->_distance = query->_distance == NULL ? NULL : TRI_DuplicateString(query->_distance); - - return &clone->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees a within query -//////////////////////////////////////////////////////////////////////////////// - -static void FreeWithinQuery (TRI_fluent_query_t* qry, bool descend) { - TRI_within_query_t* query; - - query = (TRI_within_query_t*) qry; - - if (descend) { - query->_operand->free(query->_operand, descend); - } - - TRI_Free(query); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- constructors and destructors -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a full scan of a collection -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateCollectionQuery (TRI_vocbase_col_t const* collection) { - TRI_collection_query_t* query; - - query = TRI_Allocate(sizeof(TRI_collection_query_t)); - - query->base._type = TRI_QUE_TYPE_COLLECTION; - query->base._collection = collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseCollectionQuery; - query->base.execute = ExecuteCollectionQuery; - query->base.json = JsonCollectionQuery; - query->base.stringify = StringifyCollectionQuery; - query->base.clone = CloneCollectionQuery; - query->base.free = FreeCollectionQuery; - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief adds the distance to a query -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateDistanceQuery (TRI_fluent_query_t* operand, char const* distance) { - TRI_distance_query_t* query; - - query = TRI_Allocate(sizeof(TRI_distance_query_t)); - - query->base._type = TRI_QUE_TYPE_DISTANCE; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseDistanceQuery; - query->base.execute = ExecuteDistanceQuery; - query->base.json = JsonDistanceQuery; - query->base.stringify = StringifyDistanceQuery; - query->base.clone = CloneDistanceQuery; - query->base.free = FreeDistanceQuery; - - query->_operand = operand; - query->_distance = TRI_DuplicateString(distance); - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up a document -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateDocumentQuery (TRI_fluent_query_t* operand, TRI_voc_did_t did) { - TRI_document_query_t* query; - - query = TRI_Allocate(sizeof(TRI_document_query_t)); - - query->base._type = TRI_QUE_TYPE_DOCUMENT; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseDocumentQuery; - query->base.execute = ExecuteDocumentQuery; - query->base.json = JsonDocumentQuery; - query->base.stringify = StringifyDocumentQuery; - query->base.clone = CloneDocumentQuery; - query->base.free = FreeDocumentQuery; - - query->_operand = operand; - query->_did = did; - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up edges -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateEdgesQuery (TRI_vocbase_col_t const* edges, - TRI_fluent_query_t* operand, - TRI_edge_direction_e direction) { - TRI_edges_query_t* query; - - query = TRI_Allocate(sizeof(TRI_edges_query_t)); - - query->base._type = TRI_QUE_TYPE_EDGES; - query->base._collection = edges; - query->base._isOptimised = false; - - query->base.optimise = OptimiseEdgesQuery; - query->base.execute = ExecuteEdgesQuery; - query->base.json = JsonEdgesQuery; - query->base.stringify = StringifyEdgesQuery; - query->base.clone = CloneEdgesQuery; - query->base.free = FreeEdgesQuery; - - query->_operand = operand; - query->_direction = direction; - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up an geo-spatial index as hint -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateGeoIndexQuery (TRI_fluent_query_t* operand, - char const* location, - char const* latitude, - char const* longitude, - bool geoJson) { - TRI_geo_index_query_t* query; - - query = TRI_Allocate(sizeof(TRI_geo_index_query_t)); - - query->base._type = TRI_QUE_TYPE_GEO_INDEX; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseGeoIndexQuery; - query->base.execute = ExecuteGeoIndexQuery; - query->base.json = JsonGeoIndexQuery; - query->base.stringify = StringifyGeoIndexQuery; - query->base.clone = CloneGeoIndexQuery; - query->base.free = FreeGeoIndeyQuery; - - query->_operand = operand; - - query->_location = (location == NULL ? NULL : TRI_DuplicateString(location)); - query->_geoJson = geoJson; - - query->_latitude = (latitude == NULL ? NULL : TRI_DuplicateString(latitude)); - query->_longitude = (longitude == NULL ? NULL : TRI_DuplicateString(longitude)); - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief limits an existing query -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateLimitQuery (TRI_fluent_query_t* operand, TRI_voc_ssize_t limit) { - TRI_limit_query_t* query; - - query = TRI_Allocate(sizeof(TRI_limit_query_t)); - - query->base._type = TRI_QUE_TYPE_LIMIT; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseLimitQuery; - query->base.execute = ExecuteLimitQuery; - query->base.json = JsonLimitQuery; - query->base.stringify = StringifyLimitQuery; - query->base.clone = CloneLimitQuery; - query->base.free = FreeLimitQuery; - - query->_operand = operand; - query->_limit = limit; - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up documents near a given point -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateNearQuery (TRI_fluent_query_t* operand, - double latitude, - double longitude, - char const* distance) { - TRI_near_query_t* query; - - query = TRI_Allocate(sizeof(TRI_near_query_t)); - - query->base._type = TRI_QUE_TYPE_NEAR; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseNearQuery; - query->base.execute = ExecuteNearQuery; - query->base.json = JsonNearQuery; - query->base.stringify = StringifyNearQuery; - query->base.clone = CloneNearQuery; - query->base.free = FreeNearQuery; - - query->_operand = operand; - query->_latitude = latitude; - query->_longitude = longitude; - query->_limit = -1; - query->_distance = (distance == NULL ? NULL : TRI_DuplicateString(distance)); - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief skips elements of an existing query -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateSelectFullQuery (TRI_fluent_query_t* operand, - size_t n, - TRI_shape_pid_t* pids, - TRI_shaped_json_t** values) { - TRI_select_full_query_t* query; - - query = TRI_Allocate(sizeof(TRI_select_full_query_t)); - - query->base._type = TRI_QUE_TYPE_SELECT_FULL_QUERY; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseSelectFullQuery; - query->base.execute = ExecuteSelectFullQuery; - query->base.json = JsonSelectFullQuery; - query->base.stringify = StringifySelectFullQuery; - query->base.clone = CloneSelectFullQuery; - query->base.free = FreeSelectFullQuery; - - query->_operand = operand; - query->_length = n; - query->_pids = pids; - query->_values = values; - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief skips elements of an existing query -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateSkipQuery (TRI_fluent_query_t* operand, TRI_voc_size_t skip) { - TRI_skip_query_t* query; - - query = TRI_Allocate(sizeof(TRI_skip_query_t)); - - query->base._type = TRI_QUE_TYPE_SKIP; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseSkipQuery; - query->base.execute = ExecuteSkipQuery; - query->base.json = JsonSkipQuery; - query->base.stringify = StringifySkipQuery; - query->base.clone = CloneSkipQuery; - query->base.free = FreeSkipQuery; - - query->_operand = operand; - query->_skip = skip; - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up documents within a given radius -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateWithinQuery (TRI_fluent_query_t* operand, - double latitude, - double longitude, - double radius, - char const* distance) { - TRI_within_query_t* query; - - query = TRI_Allocate(sizeof(TRI_within_query_t)); - - query->base._type = TRI_QUE_TYPE_WITHIN; - query->base._collection = operand->_collection; - query->base._isOptimised = false; - - query->base.optimise = OptimiseWithinQuery; - query->base.execute = ExecuteWithinQuery; - query->base.json = JsonWithinQuery; - query->base.stringify = StringifyWithinQuery; - query->base.clone = CloneWithinQuery; - query->base.free = FreeWithinQuery; - - query->_operand = operand; - query->_latitude = latitude; - query->_longitude = longitude; - query->_radius = radius; - query->_distance = (distance == NULL ? NULL : TRI_DuplicateString(distance)); - - return &query->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- public functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a query -//////////////////////////////////////////////////////////////////////////////// - -TRI_result_set_t* TRI_ExecuteQuery (TRI_fluent_query_t* query) { - TRI_doc_collection_t* collection = query->_collection->_collection; - TRI_rs_container_element_t* ce; - TRI_fluent_query_result_t result; - TRI_result_set_t* rs; - TRI_rs_info_t info; - - result._cursor = TRI_DuplicateString("query"); - result._error = NULL; - - result._length = 0; - result._total = 0; - - result._documents = NULL; - result._augmented = NULL; - - result._scannedIndexEntries = 0; - result._scannedDocuments = 0; - result._matchedDocuments = 0; - - info._runtime = -TRI_microtime(); - - // ............................................................................. - // inside a read transaction - // ............................................................................. - - collection->beginRead(collection); - - ce = TRI_AddResultSetRSContainer(&collection->_resultSets); - - query->execute(query, &result); - - if (result._error) { - LOG_TRACE("query returned error: %s", result._error); - rs = TRI_CreateRSSingle(collection, ce, NULL, 0); - rs->_error = result._error; - - FreeAugmented(&result); - } - else { - LOG_TRACE("query returned '%lu' documents", (unsigned long) result._length); - rs = TRI_CreateRSVector(collection, - ce, - result._documents, - result._augmented, - result._length, - result._total); - } - - ce->_resultSet = rs; - - collection->endRead(collection); - - // ............................................................................. - // outside a read transaction - // ............................................................................. - - info._cursor = result._cursor; - - info._runtime += TRI_microtime(); - - info._scannedIndexEntries = result._scannedIndexEntries; - info._scannedDocuments = result._scannedDocuments; - info._matchedDocuments = result._matchedDocuments; - - rs->_info = info; - - FreeDocuments(&result); - - return rs; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: diff --git a/VocBase/fluent-query.h b/VocBase/fluent-query.h deleted file mode 100644 index 38ea2e8452..0000000000 --- a/VocBase/fluent-query.h +++ /dev/null @@ -1,408 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief fluent query -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2011 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -/// @author Copyright 2011, triAGENS GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#ifndef TRIAGENS_DURHAM_VOC_BASE_FLUENT_QUERY_H -#define TRIAGENS_DURHAM_VOC_BASE_FLUENT_QUERY_H 1 - -#include - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -// ----------------------------------------------------------------------------- -// --SECTION-- forward declarations -// ----------------------------------------------------------------------------- - -struct TRI_rs_container_s; -struct TRI_index_s; - -// ----------------------------------------------------------------------------- -// --SECTION-- public types -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief query type -//////////////////////////////////////////////////////////////////////////////// - -typedef enum { - TRI_QUE_TYPE_COLLECTION, - TRI_QUE_TYPE_DISTANCE, - TRI_QUE_TYPE_DOCUMENT, - TRI_QUE_TYPE_EDGES, - TRI_QUE_TYPE_GEO_INDEX, - TRI_QUE_TYPE_LIMIT, - TRI_QUE_TYPE_NEAR, - TRI_QUE_TYPE_SELECT_FULL_QUERY, - TRI_QUE_TYPE_SKIP, - TRI_QUE_TYPE_WITHIN -} -TRI_que_type_e; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief query result -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_fluent_query_result_s { - char* _cursor; - char* _error; - - TRI_voc_size_t _length; - TRI_voc_size_t _total; - - TRI_voc_size_t _scannedIndexEntries; - TRI_voc_size_t _scannedDocuments; - TRI_voc_size_t _matchedDocuments; - - struct TRI_doc_mptr_s const** _documents; - struct TRI_json_s* _augmented; -} -TRI_fluent_query_result_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief query -/// -/// A query contains the following methods. -/// -/// char* optimise (TRI_fluent_query_t**) -/// -/// Checks and optimises the query. This might change the pointer. If a new -/// query is create, the old query is freed. In case of an error, an error -/// message is returned. -/// -/// void execute (TRI_fluent_query_t*, TRI_fluent_query_result_t*) -/// -/// Executes the query and stores the result set in a @c TRI_fluent_query_result_t. -/// You must call @c optimise before calling @c execute. In case of an error -/// during the executing, the error message is stored in the field @c -/// _error. The query result must be clear using the free method of the @c -/// TRI_fluent_query_result_t. -/// -/// TRI_json_t* json (TRI_fluent_query_t*) -/// -/// Returns a json description. -/// -/// void stringify (TRI_fluent_query_t*, TRI_string_buffer_t*) -/// -/// Appends a string representation to the buffer. -/// -/// TRI_fluent_query_t* clone (TRI_fluent_query_t*) -/// -/// Clones an existing query. -/// -/// void free (TRI_fluent_query_t*, bool) -/// -/// Frees all resources associated with the query. If the second parameter is -/// true, also free all operands. This method will not clear any resources -/// allocated during an @c execute associated with the @c TRI_fluent_query_result_t. -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_fluent_query_s { - TRI_que_type_e _type; - TRI_vocbase_col_t const* _collection; - bool _isOptimised; - - char* (*optimise) (struct TRI_fluent_query_s**); - void (*execute) (struct TRI_fluent_query_s*, TRI_fluent_query_result_t*); - TRI_json_t* (*json) (struct TRI_fluent_query_s*); - void (*stringify) (struct TRI_fluent_query_s*, TRI_string_buffer_t*); - struct TRI_fluent_query_s* (*clone) (struct TRI_fluent_query_s*); - void (*free) (struct TRI_fluent_query_s*, bool); -} -TRI_fluent_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief full collection query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_collection_query_s { - TRI_fluent_query_t base; -} -TRI_collection_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief distance query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_distance_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - char* _distance; -} -TRI_distance_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief document query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_document_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - TRI_voc_did_t _did; -} -TRI_document_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief edges query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_edges_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - - TRI_edge_direction_e _direction; -} -TRI_edges_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief geo index query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_geo_index_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - - char* _location; - char* _latitude; - char * _longitude; - - bool _geoJson; -} -TRI_geo_index_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief limit query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_limit_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - TRI_voc_ssize_t _limit; -} -TRI_limit_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief near query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_near_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - - char* _distance; - - double _latitude; - double _longitude; - - TRI_voc_ssize_t _limit; -} -TRI_near_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief skip query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_select_full_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - - size_t _length; - TRI_shape_pid_t* _pids; - TRI_shaped_json_t** _values; -} -TRI_select_full_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief skip query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_skip_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - TRI_voc_size_t _skip; -} -TRI_skip_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief within query -//////////////////////////////////////////////////////////////////////////////// - -typedef struct TRI_within_query_s { - TRI_fluent_query_t base; - - TRI_fluent_query_t* _operand; - - char* _distance; - - double _latitude; - double _longitude; - double _radius; -} -TRI_within_query_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- constructors and destructors -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a full scan of a collection -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateCollectionQuery (TRI_vocbase_col_t const*); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief adds the distance to a query -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateDistanceQuery (TRI_fluent_query_t*, char const* name); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up a document -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateDocumentQuery (TRI_fluent_query_t*, TRI_voc_did_t); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up edges -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateEdgesQuery (TRI_vocbase_col_t const* edges, - TRI_fluent_query_t*, - TRI_edge_direction_e direction); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief selects elements by example -/// -/// The query takes ownership of the pids and values. -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateSelectFullQuery (TRI_fluent_query_t*, - size_t n, - TRI_shape_pid_t* pids, - TRI_shaped_json_t** values); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up an geo-spatial index -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateGeoIndexQuery (TRI_fluent_query_t*, - char const* location, - char const* latitude, - char const* longitude, - bool geoJson); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief limits an existing query -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateLimitQuery (TRI_fluent_query_t*, TRI_voc_ssize_t); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up documents near a given point -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateNearQuery (TRI_fluent_query_t*, - double latitude, - double longitude, - char const* distance); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief skips elements of an existing query -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateSkipQuery (TRI_fluent_query_t*, TRI_voc_size_t); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up documents within a given radius -//////////////////////////////////////////////////////////////////////////////// - -TRI_fluent_query_t* TRI_CreateWithinQuery (TRI_fluent_query_t*, - double latitude, - double longitude, - double radius, - char const* distance); - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- public functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief executes a query -//////////////////////////////////////////////////////////////////////////////// - -TRI_result_set_t* TRI_ExecuteQuery (TRI_fluent_query_t*); - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -} -#endif - -#endif - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: diff --git a/VocBase/headers.c b/VocBase/headers.c index a8fe8cf000..ec65ef6db7 100644 --- a/VocBase/headers.c +++ b/VocBase/headers.c @@ -71,6 +71,7 @@ simple_headers_t; //////////////////////////////////////////////////////////////////////////////// static void ClearSimpleHeaders (TRI_doc_mptr_t* header, size_t headerSize) { + assert(header); memset(header, 0, headerSize); } @@ -88,6 +89,9 @@ static TRI_doc_mptr_t* RequestSimpleHeaders (TRI_headers_t* h) { char* ptr; begin = TRI_Allocate(NUMBER_HEADERS_PER_BLOCK * headers->_headerSize); + if (!begin) { + // TODO: FIXME + } ptr = begin + headers->_headerSize * (NUMBER_HEADERS_PER_BLOCK - 1); header = NULL; @@ -151,6 +155,9 @@ static void ReleaseSimpleHeaders (TRI_headers_t* h, TRI_doc_mptr_t* header) { TRI_headers_t* TRI_CreateSimpleHeaders (size_t headerSize) { simple_headers_t* headers = TRI_Allocate(sizeof(simple_headers_t)); + if (!headers) { + // TODO: FIXME + } headers->base.request = RequestSimpleHeaders; headers->base.verify = VerifySimpleHeaders; headers->base.release = ReleaseSimpleHeaders; diff --git a/VocBase/index.c b/VocBase/index.c index d44d920179..df9fbbfcb3 100644 --- a/VocBase/index.c +++ b/VocBase/index.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -62,8 +63,29 @@ bool TRI_RemoveIndex (TRI_doc_collection_t* collection, TRI_index_t* idx) { // construct filename number = TRI_StringUInt64(idx->_iid); + + if (!number) { + LOG_ERROR("out of memory when creating index number"); + return false; + } + name = TRI_Concatenate3String("index-", number, ".json"); + + if (!name) { + TRI_FreeString(number); + LOG_ERROR("out of memory when creating index name"); + return false; + } + filename = TRI_Concatenate2File(collection->base._directory, name); + + if (!filename) { + TRI_FreeString(number); + TRI_FreeString(name); + LOG_ERROR("out of memory when creating index filename"); + return false; + } + TRI_FreeString(name); TRI_FreeString(number); @@ -99,8 +121,28 @@ bool TRI_SaveIndex (TRI_doc_collection_t* collection, TRI_index_t* idx) { // construct filename number = TRI_StringUInt64(idx->_iid); + if (!number) { + LOG_ERROR("out of memory when creating index number"); + TRI_FreeJson(json); + return false; + } + name = TRI_Concatenate3String("index-", number, ".json"); + if (!name) { + LOG_ERROR("out of memory when creating index name"); + TRI_FreeJson(json); + TRI_FreeString(number); + return false; + } + filename = TRI_Concatenate2File(collection->base._directory, name); + if (!filename) { + LOG_ERROR("out of memory when creating index filename"); + TRI_FreeJson(json); + TRI_FreeString(number); + TRI_FreeString(name); + return false; + } TRI_FreeString(name); TRI_FreeString(number); @@ -117,6 +159,350 @@ bool TRI_SaveIndex (TRI_doc_collection_t* collection, TRI_index_t* idx) { return true; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief looks up an index identifier +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_LookupIndex (TRI_doc_collection_t* collection, TRI_idx_iid_t iid) { + TRI_sim_collection_t* sim; + TRI_index_t* idx; + size_t i; + + if (collection->base._type != TRI_COL_TYPE_SIMPLE_DOCUMENT) { + return NULL; + } + + sim = (TRI_sim_collection_t*) collection; + + for (i = 0; i < sim->_indexes._length; ++i) { + idx = sim->_indexes._buffer[i]; + + if (idx->_iid == iid) { + return idx; + } + } + + return NULL; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free an existing index definition +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeIndexDefinition (TRI_index_definition_t* definition) { + assert(definition->_fields); + TRI_FreeVectorString(definition->_fields); + TRI_Free(definition); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free an existing index definitions vector +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeIndexDefinitions (TRI_vector_pointer_t* definitions) { + TRI_index_definition_t* definition; + size_t i; + + if (!definitions) { + return; + } + + for (i = 0; i < definitions->_length; i++) { + definition = (TRI_index_definition_t*) definitions->_buffer[i]; + assert(definition); + TRI_FreeIndexDefinition(definition); + } + + TRI_FreeVectorPointer(definitions); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief read the fields of an index from a json structure and return them +//////////////////////////////////////////////////////////////////////////////// + +static TRI_vector_string_t* GetFieldsIndex (const TRI_idx_type_e indexType, + TRI_json_t* json, + TRI_index_geo_variant_e* geoVariant) { + TRI_vector_string_t* fields; + TRI_json_t* strVal; + TRI_json_t* strVal2; + char* temp1; + char* temp2; + char* temp3; + uint32_t numFields; + size_t i; + + *geoVariant = INDEX_GEO_NONE; + fields = (TRI_vector_string_t*) TRI_Allocate(sizeof(TRI_vector_string_t)); + if (!fields) { + return NULL; + } + + TRI_InitVectorString(fields); + if (indexType == TRI_IDX_TYPE_GEO_INDEX) { + strVal = TRI_LookupArrayJson(json, "location"); + if (!strVal || strVal->_type != TRI_JSON_STRING) { + strVal = TRI_LookupArrayJson(json, "latitude"); + if (!strVal || strVal->_type != TRI_JSON_STRING) { + return fields; + } + strVal2 = TRI_LookupArrayJson(json, "longitude"); + if (!strVal2 || strVal2->_type != TRI_JSON_STRING) { + return fields; + } + temp1 = TRI_DuplicateString(strVal->_value._string.data); + if (!temp1) { + return fields; + } + TRI_PushBackVectorString(fields, temp1); + + temp1 = TRI_DuplicateString(strVal2->_value._string.data); + if (!temp1) { + return fields; + } + TRI_PushBackVectorString(fields, temp1); + *geoVariant = INDEX_GEO_INDIVIDUAL_LAT_LON; + } + else { + *geoVariant = INDEX_GEO_COMBINED_LON_LAT; + + strVal2 = TRI_LookupArrayJson(json, "geoJson"); + if (strVal2 && strVal2->_type == TRI_JSON_BOOLEAN) { + if (strVal2->_value._boolean) { + *geoVariant = INDEX_GEO_COMBINED_LAT_LON; + } + } + TRI_PushBackVectorString(fields, strVal->_value._string.data); + } + } + else { + // read number of fields + strVal = TRI_LookupArrayJson(json, "field_count"); + if (!strVal || strVal->_type != TRI_JSON_NUMBER) { + return fields; + } + + numFields = (uint32_t) strVal->_value._number; + if (numFields == 0) { + return fields; + } + + // read field names + for (i = 0; i < numFields ; i++) { + temp1 = TRI_StringUInt32(i); + if (temp1) { + temp2 = TRI_Concatenate2String("field_", temp1); + if (temp2) { + strVal = TRI_LookupArrayJson(json, temp2); + if (strVal && strVal->_type == TRI_JSON_STRING) { + temp3 = TRI_DuplicateString(strVal->_value._string.data); + if (temp3) { + TRI_PushBackVectorString(fields, temp3); + } + } + TRI_FreeString(temp2); + } + TRI_FreeString(temp1); + } + } + } + + return fields; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief gets the definitions of all index files for a collection +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t* TRI_GetCollectionIndexes(const TRI_vocbase_t* vocbase, + const char* collectionName) { + TRI_vector_pointer_t* indexes; + TRI_index_definition_t* indexDefinition; + TRI_index_geo_variant_e geoVariant; + TRI_vector_string_t indexFiles; + TRI_vector_string_t* fields; + TRI_json_t* json; + TRI_json_t* strVal; + TRI_json_t* numVal; + char* error; + char* temp; + TRI_idx_iid_t indexId; + TRI_idx_type_e indexType; + bool indexUnique; + size_t i; + + assert(vocbase); + + indexes = (TRI_vector_pointer_t*) TRI_Allocate(sizeof(TRI_vector_pointer_t)); + if (!indexes) { + return NULL; + } + TRI_InitVectorPointer(indexes); + + // add "pseudo" primary index + indexDefinition = (TRI_index_definition_t*) TRI_Allocate(sizeof(TRI_index_definition_t)); + if (indexDefinition) { + indexDefinition->_fields = TRI_Allocate(sizeof(TRI_vector_string_t)); + if (!indexDefinition->_fields) { + TRI_Free(indexDefinition); + return NULL; + } + + TRI_InitVectorString(indexDefinition->_fields); + indexDefinition->_iid = 0; // note: this id is ignored + indexDefinition->_type = TRI_IDX_TYPE_PRIMARY_INDEX; + indexDefinition->_isUnique = true; // primary index is always unique + + temp = TRI_DuplicateString("_id"); + if (temp) { + TRI_PushBackVectorString(indexDefinition->_fields, temp); // name of field + } + TRI_PushBackVectorPointer(indexes, indexDefinition); + } + + // get all index filenames + indexFiles = TRI_GetCollectionIndexFiles(vocbase, collectionName); + + for (i = 0; i < indexFiles._length; ++i) { + // read JSON data from index file + json = TRI_JsonFile(indexFiles._buffer[i], &error); + if (!json) { + continue; + } + if (error) { + goto NEXT_INDEX; + } + + if (json->_type != TRI_JSON_ARRAY) { + goto NEXT_INDEX; + } + + // index file contains a JSON array. fine. + + // read index id + indexId = 0; + numVal = TRI_LookupArrayJson(json, "iid"); + if (!numVal || numVal->_type != TRI_JSON_NUMBER) { + goto NEXT_INDEX; + } + indexId = (uint64_t) numVal->_value._number; + if (indexId == 0) { + goto NEXT_INDEX; + } + + // read uniqueness information + strVal = TRI_LookupArrayJson(json, "unique"); + if (!strVal || strVal->_type != TRI_JSON_BOOLEAN) { + indexUnique = false; // default is non-unique index + } + else { + indexUnique = strVal->_value._boolean; + } + + // read index type + strVal = TRI_LookupArrayJson(json, "type"); + if (!strVal || strVal->_type != TRI_JSON_STRING) { + goto NEXT_INDEX; + } + if (strcmp(strVal->_value._string.data, "hash") == 0) { + indexType = TRI_IDX_TYPE_HASH_INDEX; + } + if (strcmp(strVal->_value._string.data, "skiplist") == 0) { + indexType = TRI_IDX_TYPE_SKIPLIST_INDEX; + } + else if (strcmp(strVal->_value._string.data, "geo") == 0) { + indexType = TRI_IDX_TYPE_GEO_INDEX; + } + else { + // unknown index type + goto NEXT_INDEX; + } + + fields = GetFieldsIndex(indexType, json, &geoVariant); + if (!fields) { + goto NEXT_INDEX; + } + if (fields->_length == 0) { + TRI_DestroyVectorString(fields); + TRI_Free(fields); + goto NEXT_INDEX; + } + + // create the index definition + indexDefinition = + (TRI_index_definition_t*) TRI_Allocate(sizeof(TRI_index_definition_t)); + if (!indexDefinition) { + TRI_FreeVectorString(fields); + goto NEXT_INDEX; + } + + indexDefinition->_iid = indexId; + indexDefinition->_type = indexType; + indexDefinition->_isUnique = indexUnique; + indexDefinition->_fields = fields; + indexDefinition->_geoVariant = geoVariant; + + TRI_PushBackVectorPointer(indexes, indexDefinition); + +NEXT_INDEX: + TRI_FreeJson(json); + } + TRI_DestroyVectorString(&indexFiles); + + return indexes; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief gets the names of all index files for a collection +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_string_t TRI_GetCollectionIndexFiles(const TRI_vocbase_t* vocbase, + const char* collectionName) { + TRI_vector_string_t files; + TRI_vector_string_t indexFiles; + char *path; + size_t i; + size_t n; + + assert(vocbase); + TRI_InitVectorString(&indexFiles); + + path = TRI_Concatenate2File(vocbase->_path, collectionName); + if (!path) { + return indexFiles; + } + + files = TRI_FilesDirectory(path); + n = files._length; + + for (i = 0; i < n; ++i) { + char* name; + char* file; + + name = files._buffer[i]; + + if (name[0] == '\0' || strncmp(name, "index-", 6) != 0) { + continue; + } + + file = TRI_Concatenate2File(path, name); + if (!file) { + continue; + } + + if (TRI_IsDirectory(file)) { + continue; + } + + TRI_PushBackVectorString(&indexFiles, file); + } + + TRI_DestroyVectorString(&files); + TRI_FreeString(path); + + return indexFiles; +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -135,7 +521,7 @@ bool TRI_SaveIndex (TRI_doc_collection_t* collection, TRI_index_t* idx) { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @brief extracts a boolean from an array +/// @brief extracts a double value from an array //////////////////////////////////////////////////////////////////////////////// static bool ExtractDoubleArray (TRI_shaper_t* shaper, @@ -151,21 +537,26 @@ static bool ExtractDoubleArray (TRI_shaper_t* shaper, acc = TRI_ShapeAccessor(shaper, sid, pid); if (acc == NULL || acc->_shape == NULL) { + if (acc) { + TRI_FreeShapeAccessor(acc); + } return false; } if (acc->_shape->_sid != shaper->_sidNumber) { + TRI_FreeShapeAccessor(acc); return false; } ok = TRI_ExecuteShapeAccessor(acc, document, &json); *result = * (double*) json._data.data; + TRI_FreeShapeAccessor(acc); return true; } //////////////////////////////////////////////////////////////////////////////// -/// @brief extracts a boolean from a list +/// @brief extracts a double value from a list //////////////////////////////////////////////////////////////////////////////// static bool ExtractDoubleList (TRI_shaper_t* shaper, @@ -190,14 +581,14 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, // in-homogenous list if (acc->_shape->_type == TRI_SHAPE_LIST) { ok = TRI_ExecuteShapeAccessor(acc, document, &list); - len = TRI_LengthListShapedJson((TRI_list_shape_t*) acc->_shape, &list); + len = TRI_LengthListShapedJson((const TRI_list_shape_t*) acc->_shape, &list); if (len < 2) { return false; } // latitude - ok = TRI_AtListShapedJson((TRI_list_shape_t*) acc->_shape, &list, 0, &entry); + ok = TRI_AtListShapedJson((const TRI_list_shape_t*) acc->_shape, &list, 0, &entry); if (! ok || entry._sid != shaper->_sidNumber) { return false; @@ -206,7 +597,7 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, *latitude = * (double*) entry._data.data; // longitude - ok = TRI_AtListShapedJson((TRI_list_shape_t*) acc->_shape, &list, 1, &entry); + ok = TRI_AtListShapedJson((const TRI_list_shape_t*) acc->_shape, &list, 1, &entry); if (!ok || entry._sid != shaper->_sidNumber) { return false; @@ -219,9 +610,9 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, // homogenous list else if (acc->_shape->_type == TRI_SHAPE_HOMOGENEOUS_LIST) { - TRI_homogeneous_list_shape_t* hom; + const TRI_homogeneous_list_shape_t* hom; - hom = (TRI_homogeneous_list_shape_t*) acc->_shape; + hom = (const TRI_homogeneous_list_shape_t*) acc->_shape; if (hom->_sidEntry != shaper->_sidNumber) { return false; @@ -233,14 +624,14 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, return false; } - len = TRI_LengthHomogeneousListShapedJson((TRI_homogeneous_list_shape_t*) acc->_shape, &list); + len = TRI_LengthHomogeneousListShapedJson((const TRI_homogeneous_list_shape_t*) acc->_shape, &list); if (len < 2) { return false; } // latitude - ok = TRI_AtHomogeneousListShapedJson((TRI_homogeneous_list_shape_t*) acc->_shape, &list, 0, &entry); + ok = TRI_AtHomogeneousListShapedJson((const TRI_homogeneous_list_shape_t*) acc->_shape, &list, 0, &entry); if (! ok) { return false; @@ -249,7 +640,7 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, *latitude = * (double*) entry._data.data; // longitude - ok = TRI_AtHomogeneousListShapedJson((TRI_homogeneous_list_shape_t*) acc->_shape, &list, 1, &entry); + ok = TRI_AtHomogeneousListShapedJson((const TRI_homogeneous_list_shape_t*) acc->_shape, &list, 1, &entry); if (! ok) { return false; @@ -262,9 +653,9 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, // homogeneous list else if (acc->_shape->_type == TRI_SHAPE_HOMOGENEOUS_SIZED_LIST) { - TRI_homogeneous_sized_list_shape_t* hom; + const TRI_homogeneous_sized_list_shape_t* hom; - hom = (TRI_homogeneous_sized_list_shape_t*) acc->_shape; + hom = (const TRI_homogeneous_sized_list_shape_t*) acc->_shape; if (hom->_sidEntry != shaper->_sidNumber) { return false; @@ -276,14 +667,14 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, return false; } - len = TRI_LengthHomogeneousSizedListShapedJson((TRI_homogeneous_sized_list_shape_t*) acc->_shape, &list); + len = TRI_LengthHomogeneousSizedListShapedJson((const TRI_homogeneous_sized_list_shape_t*) acc->_shape, &list); if (len < 2) { return false; } // latitude - ok = TRI_AtHomogeneousSizedListShapedJson((TRI_homogeneous_sized_list_shape_t*) acc->_shape, &list, 0, &entry); + ok = TRI_AtHomogeneousSizedListShapedJson((const TRI_homogeneous_sized_list_shape_t*) acc->_shape, &list, 0, &entry); if (! ok) { return false; @@ -292,7 +683,7 @@ static bool ExtractDoubleList (TRI_shaper_t* shaper, *latitude = * (double*) entry._data.data; // longitude - ok = TRI_AtHomogeneousSizedListShapedJson((TRI_homogeneous_sized_list_shape_t*) acc->_shape, &list, 1, &entry); + ok = TRI_AtHomogeneousSizedListShapedJson((const TRI_homogeneous_sized_list_shape_t*) acc->_shape, &list, 1, &entry); if (! ok) { return false; @@ -345,6 +736,7 @@ static bool InsertGeoIndex (TRI_index_t* idx, TRI_doc_mptr_t const* doc) { // and insert into index gc.latitude = latitude; gc.longitude = longitude; + cnv.c = doc; gc.data = cnv.p; @@ -352,7 +744,7 @@ static bool InsertGeoIndex (TRI_index_t* idx, TRI_doc_mptr_t const* doc) { res = GeoIndex_insert(geo->_geoIndex, &gc); if (res == -1) { - LOG_WARNING("found duplicate entry in geo-index, should not happend"); + LOG_WARNING("found duplicate entry in geo-index, should not happen"); } else if (res == -2) { LOG_WARNING("out-of-memory in geo-index"); @@ -427,7 +819,7 @@ static bool UpdateGeoIndex (TRI_index_t* idx, TRI_doc_mptr_t const* doc, TRI_sha res = GeoIndex_insert(geo->_geoIndex, &gc); if (res == -1) { - LOG_WARNING("found duplicate entry in geo-index, should not happend"); + LOG_WARNING("found duplicate entry in geo-index, should not happen"); } else if (res == -2) { LOG_WARNING("out-of-memory in geo-index"); @@ -512,6 +904,7 @@ static TRI_json_t* JsonGeoIndex (TRI_index_t* idx, TRI_doc_collection_t* collect TRI_Insert2ArrayJson(json, "iid", TRI_CreateNumberJson(idx->_iid)); TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("geo")); TRI_Insert2ArrayJson(json, "location", TRI_CreateStringCopyJson(location)); + TRI_Insert2ArrayJson(json, "geoJson", TRI_CreateBooleanJson(geo->_geoJson)); return json; } @@ -581,6 +974,9 @@ TRI_index_t* TRI_CreateGeoIndex (struct TRI_doc_collection_s* collection, TRI_geo_index_t* geo; geo = TRI_Allocate(sizeof(TRI_geo_index_t)); + if (!geo) { + return NULL; + } geo->base._iid = TRI_NewTickVocBase(); geo->base._type = TRI_IDX_TYPE_GEO_INDEX; @@ -611,6 +1007,9 @@ TRI_index_t* TRI_CreateGeoIndex2 (struct TRI_doc_collection_s* collection, TRI_geo_index_t* geo; geo = TRI_Allocate(sizeof(TRI_geo_index_t)); + if (!geo) { + return NULL; + } geo->base._iid = TRI_NewTickVocBase(); geo->base._type = TRI_IDX_TYPE_GEO_INDEX; @@ -704,6 +1103,1221 @@ GeoCoordinates* TRI_NearestGeoIndex (TRI_index_t* idx, /// @} //////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- HASH INDEX +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief attempts to locate an entry in the hash index +//////////////////////////////////////////////////////////////////////////////// + +// ............................................................................. +// Warning: who ever calls this function is responsible for destroying +// HashIndexElements* results +// ............................................................................. +HashIndexElements* TRI_LookupHashIndex(TRI_index_t* idx, TRI_json_t* parameterList) { + TRI_hash_index_t* hashIndex; + HashIndexElements* result; + HashIndexElement element; + TRI_shaper_t* shaper; + + + element.numFields = parameterList->_value._objects._length; + element.fields = TRI_Allocate( sizeof(TRI_json_t) * element.numFields); + if (element.fields == NULL) { + LOG_WARNING("out-of-memory in LookupHashIndex"); + return NULL; + } + + hashIndex = (TRI_hash_index_t*) idx; + shaper = hashIndex->base._collection->_shaper; + + for (size_t j = 0; j < element.numFields; ++j) { + TRI_json_t* jsonObject = (TRI_json_t*) (TRI_AtVector(&(parameterList->_value._objects),j)); + TRI_shaped_json_t* shapedObject = TRI_ShapedJsonJson(shaper, jsonObject); + element.fields[j] = *shapedObject; + TRI_Free(shapedObject); + } + + if (hashIndex->_unique) { + result = HashIndex_find(hashIndex->_hashIndex, &element); + } + else { + result = MultiHashIndex_find(hashIndex->_hashIndex, &element); + } + + for (size_t j = 0; j < element.numFields; ++j) { + TRI_DestroyShapedJson(element.fields + j); + } + TRI_Free(element.fields); + + return result; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief helper for hashing +//////////////////////////////////////////////////////////////////////////////// + +static bool HashIndexHelper(const TRI_hash_index_t* hashIndex, + HashIndexElement* hashElement, + const TRI_doc_mptr_t* document, + const TRI_shaped_json_t* shapedDoc) { + union { void* p; void const* c; } cnv; + TRI_shaped_json_t shapedObject; + TRI_shape_access_t* acc; + + + if (shapedDoc != NULL) { + + // .......................................................................... + // Attempting to locate a hash entry using TRI_shaped_json_t object. Use this + // when we wish to remove a hash entry and we only have the "keys" rather than + // having the document (from which the keys would follow). + // .......................................................................... + + hashElement->data = NULL; + + + for (size_t j = 0; j < hashIndex->_shapeList->_length; ++j) { + + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(hashIndex->_shapeList,j))); + + // .......................................................................... + // Determine if document has that particular shape + // .......................................................................... + acc = TRI_ShapeAccessor(hashIndex->base._collection->_shaper, shapedDoc->_sid, shape); + if (acc == NULL || acc->_shape == NULL) { + if (acc != NULL) { + TRI_FreeShapeAccessor(acc); + } + TRI_Free(hashElement->fields); + return false; + } + + + // .......................................................................... + // Extract the field + // .......................................................................... + if (! TRI_ExecuteShapeAccessor(acc, shapedDoc, &shapedObject)) { + TRI_FreeShapeAccessor(acc); + TRI_Free(hashElement->fields); + return false; + } + + + // .......................................................................... + // Store the json shaped Object -- this is what will be hashed + // .......................................................................... + hashElement->fields[j] = shapedObject; + TRI_FreeShapeAccessor(acc); + } // end of for loop + + } + + + + else if (document != NULL) { + + // .......................................................................... + // Assign the document to the HashIndexElement structure - so that it can later + // be retreived. + // .......................................................................... + cnv.c = document; + hashElement->data = cnv.p; + + + for (size_t j = 0; j < hashIndex->_shapeList->_length; ++j) { + + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(hashIndex->_shapeList,j))); + + // .......................................................................... + // Determine if document has that particular shape + // .......................................................................... + acc = TRI_ShapeAccessor(hashIndex->base._collection->_shaper, document->_document._sid, shape); + if (acc == NULL || acc->_shape == NULL) { + if (acc != NULL) { + TRI_FreeShapeAccessor(acc); + } + TRI_Free(hashElement->fields); + return false; + } + + + // .......................................................................... + // Extract the field + // .......................................................................... + if (! TRI_ExecuteShapeAccessor(acc, &(document->_document), &shapedObject)) { + TRI_FreeShapeAccessor(acc); + TRI_Free(hashElement->fields); + return false; + } + + + /* start oreste: + TRI_json_t* object; + TRI_string_buffer_t buffer; + TRI_InitStringBuffer(&buffer); + object = TRI_JsonShapedJson(hashIndex->base._collection->_shaper, &shapedObject); + TRI_Stringify2Json(&buffer,object); + printf("%s:%u:%s\n",__FILE__,__LINE__,buffer._buffer); + printf("%s:%u:%f:\n",__FILE__,__LINE__,*((double*)(shapedObject._data.data))); + TRI_DestroyStringBuffer(&buffer); + TRI_Free(object); + object = NULL; + end oreste */ + + // .......................................................................... + // Store the field + // .......................................................................... + hashElement->fields[j] = shapedObject; + TRI_FreeShapeAccessor(acc); + } // end of for loop + } + + else { + return false; + } + + return true; + +} // end of static function HashIndexHelper + + + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief hash indexes a document +//////////////////////////////////////////////////////////////////////////////// + +static bool InsertHashIndex (TRI_index_t* idx, TRI_doc_mptr_t const* doc) { + + HashIndexElement hashElement; + TRI_hash_index_t* hashIndex; + int res; + bool ok; + + // ............................................................................ + // Obtain the hash index structure + // ............................................................................ + hashIndex = (TRI_hash_index_t*) idx; + if (idx == NULL) { + LOG_WARNING("internal error in InsertHashIndex"); + return false; + } + + + // ............................................................................ + // Allocate storage to shaped json objects stored as a simple list. + // These will be used for hashing. + // ............................................................................ + + hashElement.numFields = hashIndex->_shapeList->_length; + hashElement.fields = TRI_Allocate( sizeof(TRI_shaped_json_t) * hashElement.numFields); + if (hashElement.fields == NULL) { + LOG_WARNING("out-of-memory in InsertHashIndex"); + return false; + } + ok = HashIndexHelper(hashIndex, &hashElement, doc, NULL); + + if (!ok) { + return false; + } + + + // ............................................................................ + // Fill the json field list from the document for unique hash index + // ............................................................................ + + if (hashIndex->_unique) { + res = HashIndex_insert(hashIndex->_hashIndex, &hashElement); + } + + // ............................................................................ + // Fill the json field list from the document for non-unique hash index + // ............................................................................ + + else { + res = MultiHashIndex_insert(hashIndex->_hashIndex, &hashElement); + } + + + if (res == -1) { + LOG_WARNING("found duplicate entry in hash-index, should not happen"); + } + else if (res == -2) { + LOG_WARNING("out-of-memory in hash-index"); + } + else if (res == -99) { + LOG_DEBUG("unknown error, ignoring entry"); + } + + return res == 0; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief describes a hash index as a json object +//////////////////////////////////////////////////////////////////////////////// + +static TRI_json_t* JsonHashIndex (TRI_index_t* idx, TRI_doc_collection_t* collection) { + + TRI_json_t* json; + const TRI_shape_path_t* path; + TRI_hash_index_t* hashIndex; + char const** fieldList; + char* fieldCounter; + + // .......................................................................... + // Recast as a hash index + // .......................................................................... + hashIndex = (TRI_hash_index_t*) idx; + if (hashIndex == NULL) { + return NULL; + } + + + // .......................................................................... + // Allocate sufficent memory for the field list + // .......................................................................... + fieldList = TRI_Allocate( (sizeof(char*) * hashIndex->_shapeList->_length) ); + if (fieldList == NULL) { + return NULL; + } + + + // .......................................................................... + // Convert the attributes (field list of the hash index) into strings + // .......................................................................... + for (size_t j = 0; j < hashIndex->_shapeList->_length; ++j) { + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(hashIndex->_shapeList,j))); + path = collection->_shaper->lookupAttributePathByPid(collection->_shaper, shape); + if (path == NULL) { + TRI_Free(fieldList); + return NULL; + } + fieldList[j] = ((const char*) path) + sizeof(TRI_shape_path_t) + path->_aidLength * sizeof(TRI_shape_aid_t); + } + + + // .......................................................................... + // create json object and fill it + // .......................................................................... + json = TRI_CreateArrayJson(); + if (!json) { + TRI_Free(fieldList); + return NULL; + } + + fieldCounter = TRI_Allocate(30); + if (!fieldCounter) { + TRI_Free(fieldList); + TRI_FreeJson(json); + return NULL; + } + + TRI_Insert2ArrayJson(json, "iid", TRI_CreateNumberJson(idx->_iid)); + TRI_Insert2ArrayJson(json, "unique", TRI_CreateBooleanJson(hashIndex->_unique)); + TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("hash")); + TRI_Insert2ArrayJson(json, "field_count", TRI_CreateNumberJson(hashIndex->_shapeList->_length)); + for (size_t j = 0; j < hashIndex->_shapeList->_length; ++j) { + sprintf(fieldCounter,"field_%lu",j); + TRI_Insert2ArrayJson(json, fieldCounter, TRI_CreateStringCopyJson(fieldList[j])); + } + + TRI_Free(fieldList); + TRI_Free(fieldCounter); + + return json; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes a document from a hash index +//////////////////////////////////////////////////////////////////////////////// + +static bool RemoveHashIndex (TRI_index_t* idx, TRI_doc_mptr_t const* doc) { + + HashIndexElement hashElement; + TRI_hash_index_t* hashIndex; + bool result; + + + // ............................................................................ + // Obtain the hash index structure + // ............................................................................ + hashIndex = (TRI_hash_index_t*) idx; + if (idx == NULL) { + LOG_WARNING("internal error in RemoveHashIndex"); + return false; + } + + + // ............................................................................ + // Allocate some memory for the HashIndexElement structure + // ............................................................................ + + hashElement.numFields = hashIndex->_shapeList->_length; + hashElement.fields = TRI_Allocate( sizeof(TRI_shaped_json_t) * hashElement.numFields); + if (hashElement.fields == NULL) { + LOG_WARNING("out-of-memory in InsertHashIndex"); + return false; + } + + // .......................................................................... + // Fill the json field list from the document + // .......................................................................... + if (!HashIndexHelper(hashIndex, &hashElement, doc, NULL)) { + return false; + } + + + // ............................................................................ + // Attempt the removal for unique hash indexes + // ............................................................................ + + if (hashIndex->_unique) { + result = HashIndex_remove(hashIndex->_hashIndex, &hashElement); + } + + // ............................................................................ + // Attempt the removal for non-unique hash indexes + // ............................................................................ + + else { + result = MultiHashIndex_remove(hashIndex->_hashIndex, &hashElement); + } + + + return result; +} + + +static bool UpdateHashIndex (TRI_index_t* idx, const TRI_doc_mptr_t* newDoc, + const TRI_shaped_json_t* oldDoc) { + + // .......................................................................... + // Note: The oldDoc is represented by the TRI_shaped_json_t rather than by + // a TRI_doc_mptr_t object. However for non-unique indexes we must + // pass the document shape to the hash remove function. + // .......................................................................... + + union { void* p; void const* c; } cnv; + HashIndexElement hashElement; + TRI_hash_index_t* hashIndex; + int res; + + + // ............................................................................ + // Obtain the hash index structure + // ............................................................................ + + hashIndex = (TRI_hash_index_t*) idx; + if (idx == NULL) { + LOG_WARNING("internal error in UpdateHashIndex"); + return false; + } + + + // ............................................................................ + // Allocate some memory for the HashIndexElement structure + // ............................................................................ + + hashElement.numFields = hashIndex->_shapeList->_length; + hashElement.fields = TRI_Allocate( sizeof(TRI_shaped_json_t) * hashElement.numFields); + if (hashElement.fields == NULL) { + LOG_WARNING("out-of-memory in UpdateHashIndex"); + return false; + } + + + // ............................................................................ + // Update for unique hash index + // ............................................................................ + + + // ............................................................................ + // Fill in the fields with the values from oldDoc + // ............................................................................ + + if (hashIndex->_unique) { + + + if (HashIndexHelper(hashIndex, &hashElement, NULL, oldDoc)) { + + // ............................................................................ + // We must fill the hashElement with the value of the document shape -- this + // is necessary when we attempt to remove non-unique hash indexes. + // ............................................................................ + cnv.c = newDoc; // we are assuming here that the doc ptr does not change + hashElement.data = cnv.p; + + + // ............................................................................ + // Remove the hash index entry and return. + // ............................................................................ + if (!HashIndex_remove(hashIndex->_hashIndex, &hashElement)) { + LOG_WARNING("could not remove old document from hash index in UpdateHashIndex"); + } + + } + + + // ............................................................................ + // Fill the json simple list from the document + // ............................................................................ + if (!HashIndexHelper(hashIndex, &hashElement, newDoc, NULL)) { + // .......................................................................... + // probably fields do not match + // .......................................................................... + return false; + } + + + // ............................................................................ + // Attempt to add the hash entry from the new doc + // ............................................................................ + res = HashIndex_insert(hashIndex->_hashIndex, &hashElement); + } + + + // ............................................................................ + // Update for non-unique hash index + // ............................................................................ + + else { + + // ............................................................................ + // Fill in the fields with the values from oldDoc + // ............................................................................ + + if (HashIndexHelper(hashIndex, &hashElement, NULL, oldDoc)) { + // ............................................................................ + // We must fill the hashElement with the value of the document shape -- this + // is necessary when we attempt to remove non-unique hash indexes. + // ............................................................................ + cnv.c = newDoc; + hashElement.data = cnv.p; + + // ............................................................................ + // Remove the hash index entry and return. + // ............................................................................ + if (!MultiHashIndex_remove(hashIndex->_hashIndex, &hashElement)) { + LOG_WARNING("could not remove old document from hash index in UpdateHashIndex"); + } + + } + + + // ............................................................................ + // Fill the shaped json simple list from the document + // ............................................................................ + if (!HashIndexHelper(hashIndex, &hashElement, newDoc, NULL)) { + // .......................................................................... + // probably fields do not match + // .......................................................................... + return false; + } + + + // ............................................................................ + // Attempt to add the hash entry from the new doc + // ............................................................................ + res = MultiHashIndex_insert(hashIndex->_hashIndex, &hashElement); + + } + + if (res == -1) { + LOG_WARNING("found duplicate entry in hash-index, should not happen"); + } + else if (res == -2) { + LOG_WARNING("out-of-memory in hash-index"); + } + else if (res == -99) { + LOG_DEBUG("unknown error, ignoring entry"); + } + + return res == 0; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a hash index +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_CreateHashIndex (struct TRI_doc_collection_s* collection, + TRI_vector_t* shapeList, + bool unique) { + TRI_hash_index_t* hashIndex; + hashIndex = TRI_Allocate(sizeof(TRI_hash_index_t)); + if (!hashIndex) { + return NULL; + } + + hashIndex->base._iid = TRI_NewTickVocBase(); + hashIndex->base._type = TRI_IDX_TYPE_HASH_INDEX; + hashIndex->base._collection = collection; + + hashIndex->base.insert = InsertHashIndex; + hashIndex->base.json = JsonHashIndex; + hashIndex->base.remove = RemoveHashIndex; + hashIndex->base.update = UpdateHashIndex; + hashIndex->_unique = unique; + + // ........................................................................... + // Copy the contents of the shape list vector into a new vector and store this + // ........................................................................... + hashIndex->_shapeList = TRI_Allocate(sizeof(TRI_vector_t)); + if (!hashIndex->_shapeList) { + TRI_Free(hashIndex); + return NULL; + } + + TRI_InitVector(hashIndex->_shapeList, sizeof(TRI_shape_pid_t)); + for (size_t j = 0; j < shapeList->_length; ++j) { + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(shapeList,j))); + TRI_PushBackVector(hashIndex->_shapeList,&shape); + } + + + if (unique) { + hashIndex->_hashIndex = HashIndex_new(); + } + else { + hashIndex->_hashIndex = MultiHashIndex_new(); + } + + return &hashIndex->base; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + + + + + +// ----------------------------------------------------------------------------- +// --SECTION-- SKIPLIST INDEX +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief attempts to locate an entry in the skip list index +//////////////////////////////////////////////////////////////////////////////// + +// ............................................................................. +// For now return vector list of matches -- later return an iterator? +// Warning: who ever calls this function is responsible for destroying +// SkiplistIndexElements* results +// ............................................................................. +SkiplistIndexElements* TRI_LookupSkiplistIndex(TRI_index_t* idx, TRI_json_t* parameterList) { + + TRI_skiplist_index_t* skiplistIndex; + SkiplistIndexElements* result; + SkiplistIndexElement element; + TRI_shaper_t* shaper; + + element.numFields = parameterList->_value._objects._length; + element.fields = TRI_Allocate( sizeof(TRI_json_t) * element.numFields); + + if (element.fields == NULL) { + LOG_WARNING("out-of-memory in LookupSkiplistIndex"); + return NULL; + } + + skiplistIndex = (TRI_skiplist_index_t*) idx; + shaper = skiplistIndex->base._collection->_shaper; + + for (size_t j = 0; j < element.numFields; ++j) { + TRI_json_t* jsonObject = (TRI_json_t*) (TRI_AtVector(&(parameterList->_value._objects),j)); + TRI_shaped_json_t* shapedObject = TRI_ShapedJsonJson(shaper, jsonObject); + element.fields[j] = *shapedObject; + TRI_Free(shapedObject); + } + + element.collection = skiplistIndex->base._collection; + + if (skiplistIndex->_unique) { + result = SkiplistIndex_find(skiplistIndex->_skiplistIndex, &element); + } + else { + result = MultiSkiplistIndex_find(skiplistIndex->_skiplistIndex, &element); + } + + for (size_t j = 0; j < element.numFields; ++j) { + TRI_DestroyShapedJson(element.fields + j); + } + TRI_Free(element.fields); + + return result; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief helper for skiplist methods +//////////////////////////////////////////////////////////////////////////////// + +static bool SkiplistIndexHelper(const TRI_skiplist_index_t* skiplistIndex, + SkiplistIndexElement* skiplistElement, + const TRI_doc_mptr_t* document, + const TRI_shaped_json_t* shapedDoc) { + union { void* p; void const* c; } cnv; + TRI_shaped_json_t shapedObject; + TRI_shape_access_t* acc; + + + if (shapedDoc != NULL) { + + // .......................................................................... + // Attempting to locate a entry using TRI_shaped_json_t object. Use this + // when we wish to remove a entry and we only have the "keys" rather than + // having the document (from which the keys would follow). + // .......................................................................... + + skiplistElement->data = NULL; + + + for (size_t j = 0; j < skiplistIndex->_shapeList->_length; ++j) { + + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(skiplistIndex->_shapeList,j))); + + // .......................................................................... + // Determine if document has that particular shape + // .......................................................................... + acc = TRI_ShapeAccessor(skiplistIndex->base._collection->_shaper, shapedDoc->_sid, shape); + if (acc == NULL || acc->_shape == NULL) { + if (acc != NULL) { + TRI_FreeShapeAccessor(acc); + } + TRI_Free(skiplistElement->fields); + return false; + } + + + // .......................................................................... + // Extract the field + // .......................................................................... + if (! TRI_ExecuteShapeAccessor(acc, shapedDoc, &shapedObject)) { + TRI_FreeShapeAccessor(acc); + TRI_Free(skiplistElement->fields); + return false; + } + + + // .......................................................................... + // Store the json shaped Object -- this is what will be hashed + // .......................................................................... + skiplistElement->fields[j] = shapedObject; + TRI_FreeShapeAccessor(acc); + } // end of for loop + + } + + + + else if (document != NULL) { + + // .......................................................................... + // Assign the document to the HashIndexElement structure - so that it can later + // be retreived. + // .......................................................................... + cnv.c = document; + skiplistElement->data = cnv.p; + + + for (size_t j = 0; j < skiplistIndex->_shapeList->_length; ++j) { + + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(skiplistIndex->_shapeList,j))); + + // .......................................................................... + // Determine if document has that particular shape + // .......................................................................... + acc = TRI_ShapeAccessor(skiplistIndex->base._collection->_shaper, document->_document._sid, shape); + if (acc == NULL || acc->_shape == NULL) { + if (acc != NULL) { + TRI_FreeShapeAccessor(acc); + } + TRI_Free(skiplistElement->fields); + return false; + } + + + // .......................................................................... + // Extract the field + // .......................................................................... + if (! TRI_ExecuteShapeAccessor(acc, &(document->_document), &shapedObject)) { + TRI_FreeShapeAccessor(acc); + TRI_Free(skiplistElement->fields); + return false; + } + + + // .......................................................................... + // Store the field + // .......................................................................... + skiplistElement->fields[j] = shapedObject; + TRI_FreeShapeAccessor(acc); + + } // end of for loop + } + + else { + return false; + } + + return true; + +} // end of static function SkiplistIndexHelper + + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief inserts a document into a skip list index +//////////////////////////////////////////////////////////////////////////////// + +static bool InsertSkiplistIndex (TRI_index_t* idx, TRI_doc_mptr_t const* doc) { + + SkiplistIndexElement skiplistElement; + TRI_skiplist_index_t* skiplistIndex; + int res; + bool ok; + + // ............................................................................ + // Obtain the skip listindex structure + // ............................................................................ + skiplistIndex = (TRI_skiplist_index_t*) idx; + if (idx == NULL) { + LOG_WARNING("internal error in InsertSkiplistIndex"); + return false; + } + + + // ............................................................................ + // Allocate storage to shaped json objects stored as a simple list. + // These will be used for comparisions + // ............................................................................ + + skiplistElement.numFields = skiplistIndex->_shapeList->_length; + skiplistElement.fields = TRI_Allocate( sizeof(TRI_shaped_json_t) * skiplistElement.numFields); + skiplistElement.collection = skiplistIndex->base._collection; + + if (skiplistElement.fields == NULL) { + LOG_WARNING("out-of-memory in InsertSkiplistIndex"); + return false; + } + ok = SkiplistIndexHelper(skiplistIndex, &skiplistElement, doc, NULL); + + if (!ok) { + return false; + } + + + // ............................................................................ + // Fill the json field list from the document for unique skiplist index + // ............................................................................ + + if (skiplistIndex->_unique) { + res = SkiplistIndex_insert(skiplistIndex->_skiplistIndex, &skiplistElement); + } + + // ............................................................................ + // Fill the json field list from the document for non-unique skiplist index + // ............................................................................ + + else { + res = MultiSkiplistIndex_insert(skiplistIndex->_skiplistIndex, &skiplistElement); + } + + + if (res == -1) { + LOG_WARNING("found duplicate entry in skiplist-index, should not happen"); + } + else if (res == -2) { + LOG_WARNING("out-of-memory in skiplist-index"); + } + else if (res == -99) { + LOG_DEBUG("unknown error, ignoring entry"); + } + + return res == 0; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief describes a skiplist index as a json object +//////////////////////////////////////////////////////////////////////////////// + +static TRI_json_t* JsonSkiplistIndex (TRI_index_t* idx, TRI_doc_collection_t* collection) { + + TRI_json_t* json; + const TRI_shape_path_t* path; + TRI_skiplist_index_t* skiplistIndex; + char const** fieldList; + char* fieldCounter; + + // .......................................................................... + // Recast as a skiplist index + // .......................................................................... + skiplistIndex = (TRI_skiplist_index_t*) idx; + if (skiplistIndex == NULL) { + return NULL; + } + + + // .......................................................................... + // Allocate sufficent memory for the field list + // .......................................................................... + fieldList = TRI_Allocate( (sizeof(char*) * skiplistIndex->_shapeList->_length) ); + if (fieldList == NULL) { + return NULL; + } + + + // .......................................................................... + // Convert the attributes (field list of the skiplist index) into strings + // .......................................................................... + for (size_t j = 0; j < skiplistIndex->_shapeList->_length; ++j) { + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(skiplistIndex->_shapeList,j))); + path = collection->_shaper->lookupAttributePathByPid(collection->_shaper, shape); + if (path == NULL) { + TRI_Free(fieldList); + return NULL; + } + fieldList[j] = ((const char*) path) + sizeof(TRI_shape_path_t) + path->_aidLength * sizeof(TRI_shape_aid_t); + } + + + // .......................................................................... + // create json object and fill it + // .......................................................................... + json = TRI_CreateArrayJson(); + if (!json) { + TRI_Free(fieldList); + return NULL; + } + + fieldCounter = TRI_Allocate(30); + if (!fieldCounter) { + TRI_Free(fieldList); + TRI_FreeJson(json); + return NULL; + } + + TRI_Insert2ArrayJson(json, "iid", TRI_CreateNumberJson(idx->_iid)); + TRI_Insert2ArrayJson(json, "unique", TRI_CreateBooleanJson(skiplistIndex->_unique)); + TRI_Insert2ArrayJson(json, "type", TRI_CreateStringCopyJson("skiplist")); + TRI_Insert2ArrayJson(json, "field_count", TRI_CreateNumberJson(skiplistIndex->_shapeList->_length)); + for (size_t j = 0; j < skiplistIndex->_shapeList->_length; ++j) { + sprintf(fieldCounter,"field_%lu",j); + TRI_Insert2ArrayJson(json, fieldCounter, TRI_CreateStringCopyJson(fieldList[j])); + } + + TRI_Free(fieldList); + TRI_Free(fieldCounter); + + return json; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief removes a document from a skiplist index +//////////////////////////////////////////////////////////////////////////////// + +static bool RemoveSkiplistIndex (TRI_index_t* idx, TRI_doc_mptr_t const* doc) { + + SkiplistIndexElement skiplistElement; + TRI_skiplist_index_t* skiplistIndex; + bool result; + + + // ............................................................................ + // Obtain the skiplist index structure + // ............................................................................ + skiplistIndex = (TRI_skiplist_index_t*) idx; + if (idx == NULL) { + LOG_WARNING("internal error in RemoveHashIndex"); + return false; + } + + + // ............................................................................ + // Allocate some memory for the SkiplistIndexElement structure + // ............................................................................ + + skiplistElement.numFields = skiplistIndex->_shapeList->_length; + skiplistElement.fields = TRI_Allocate( sizeof(TRI_shaped_json_t) * skiplistElement.numFields); + skiplistElement.collection = skiplistIndex->base._collection; + + if (skiplistElement.fields == NULL) { + LOG_WARNING("out-of-memory in InsertSkiplistIndex"); + return false; + } + + // .......................................................................... + // Fill the json field list from the document + // .......................................................................... + if (!SkiplistIndexHelper(skiplistIndex, &skiplistElement, doc, NULL)) { + return false; + } + + + // ............................................................................ + // Attempt the removal for unique skiplist indexes + // ............................................................................ + + if (skiplistIndex->_unique) { + result = SkiplistIndex_remove(skiplistIndex->_skiplistIndex, &skiplistElement); + } + + // ............................................................................ + // Attempt the removal for non-unique skiplist indexes + // ............................................................................ + + else { + result = MultiSkiplistIndex_remove(skiplistIndex->_skiplistIndex, &skiplistElement); + } + + + return result; +} + + +static bool UpdateSkiplistIndex (TRI_index_t* idx, const TRI_doc_mptr_t* newDoc, + const TRI_shaped_json_t* oldDoc) { + + // .......................................................................... + // Note: The oldDoc is represented by the TRI_shaped_json_t rather than by + // a TRI_doc_mptr_t object. However for non-unique indexes we must + // pass the document shape to the hash remove function. + // .......................................................................... + + union { void* p; void const* c; } cnv; + SkiplistIndexElement skiplistElement; + TRI_skiplist_index_t* skiplistIndex; + int res; + + + // ............................................................................ + // Obtain the skiplist index structure + // ............................................................................ + + skiplistIndex = (TRI_skiplist_index_t*) idx; + if (idx == NULL) { + LOG_WARNING("internal error in UpdateSkiplistIndex"); + return false; + } + + + // ............................................................................ + // Allocate some memory for the SkiplistIndexElement structure + // ............................................................................ + + skiplistElement.numFields = skiplistIndex->_shapeList->_length; + skiplistElement.fields = TRI_Allocate( sizeof(TRI_shaped_json_t) * skiplistElement.numFields); + skiplistElement.collection = skiplistIndex->base._collection; + + if (skiplistElement.fields == NULL) { + LOG_WARNING("out-of-memory in UpdateHashIndex"); + return false; + } + + + // ............................................................................ + // Update for unique skiplist index + // ............................................................................ + + + // ............................................................................ + // Fill in the fields with the values from oldDoc + // ............................................................................ + + if (skiplistIndex->_unique) { + + + if (SkiplistIndexHelper(skiplistIndex, &skiplistElement, NULL, oldDoc)) { + + // ............................................................................ + // We must fill the skiplistElement with the value of the document shape -- this + // is necessary when we attempt to remove non-unique skiplist indexes. + // ............................................................................ + cnv.c = newDoc; // we are assuming here that the doc ptr does not change + skiplistElement.data = cnv.p; + + + // ............................................................................ + // Remove the skiplist index entry and return. + // ............................................................................ + if (!SkiplistIndex_remove(skiplistIndex->_skiplistIndex, &skiplistElement)) { + LOG_WARNING("could not remove old document from skiplist index in UpdateSkiplistIndex"); + } + + } + + + // ............................................................................ + // Fill the json simple list from the document + // ............................................................................ + if (!SkiplistIndexHelper(skiplistIndex, &skiplistElement, newDoc, NULL)) { + // .......................................................................... + // probably fields do not match + // .......................................................................... + return false; + } + + + // ............................................................................ + // Attempt to add the skiplist entry from the new doc + // ............................................................................ + res = SkiplistIndex_insert(skiplistIndex->_skiplistIndex, &skiplistElement); + } + + + // ............................................................................ + // Update for non-unique skiplist index + // ............................................................................ + + else { + + // ............................................................................ + // Fill in the fields with the values from oldDoc + // ............................................................................ + + if (SkiplistIndexHelper(skiplistIndex, &skiplistElement, NULL, oldDoc)) { + // ............................................................................ + // We must fill the skiplistElement with the value of the document shape -- this + // is necessary when we attempt to remove non-unique skiplist indexes. + // ............................................................................ + cnv.c = newDoc; + skiplistElement.data = cnv.p; + + // ............................................................................ + // Remove the skiplist index entry and return. + // ............................................................................ + + if (!MultiSkiplistIndex_remove(skiplistIndex->_skiplistIndex, &skiplistElement)) { + LOG_WARNING("could not remove old document from hash index in UpdateHashIndex"); + } + + } + + + // ............................................................................ + // Fill the shaped json simple list from the document + // ............................................................................ + if (!SkiplistIndexHelper(skiplistIndex, &skiplistElement, newDoc, NULL)) { + // .......................................................................... + // probably fields do not match + // .......................................................................... + return false; + } + + + // ............................................................................ + // Attempt to add the skiplist entry from the new doc + // ............................................................................ + res = MultiSkiplistIndex_insert(skiplistIndex->_skiplistIndex, &skiplistElement); + + } + + if (res == -1) { + LOG_WARNING("found duplicate entry in skiplist-index, should not happen"); + } + else if (res == -2) { + LOG_WARNING("out-of-memory in skiplist-index"); + } + else if (res == -99) { + LOG_DEBUG("unknown error, ignoring entry"); + } + + return res == 0; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a skiplist index +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_CreateSkiplistIndex (struct TRI_doc_collection_s* collection, + TRI_vector_t* shapeList, + bool unique) { + TRI_skiplist_index_t* skiplistIndex; + skiplistIndex = TRI_Allocate(sizeof(TRI_skiplist_index_t)); + if (!skiplistIndex) { + return NULL; + } + + skiplistIndex->base._iid = TRI_NewTickVocBase(); + skiplistIndex->base._type = TRI_IDX_TYPE_SKIPLIST_INDEX; + skiplistIndex->base._collection = collection; + + skiplistIndex->base.insert = InsertSkiplistIndex; + skiplistIndex->base.json = JsonSkiplistIndex; + skiplistIndex->base.remove = RemoveSkiplistIndex; + skiplistIndex->base.update = UpdateSkiplistIndex; + skiplistIndex->_unique = unique; + + // ........................................................................... + // Copy the contents of the shape list vector into a new vector and store this + // ........................................................................... + skiplistIndex->_shapeList = TRI_Allocate(sizeof(TRI_vector_t)); + if (!skiplistIndex->_shapeList) { + TRI_Free(skiplistIndex); + return NULL; + } + + TRI_InitVector(skiplistIndex->_shapeList, sizeof(TRI_shape_pid_t)); + for (size_t j = 0; j < shapeList->_length; ++j) { + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(shapeList,j))); + TRI_PushBackVector(skiplistIndex->_shapeList,&shape); + } + + + if (unique) { + skiplistIndex->_skiplistIndex = SkiplistIndex_new(); + } + else { + skiplistIndex->_skiplistIndex = MultiSkiplistIndex_new(); + } + + return &skiplistIndex->base; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + + + + + + + + + + + + + // Local Variables: // mode: outline-minor // outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" diff --git a/VocBase/index.h b/VocBase/index.h index 69857a6904..c0f9d2291c 100644 --- a/VocBase/index.h +++ b/VocBase/index.h @@ -33,6 +33,8 @@ #include "BasicsC/json.h" #include "ShapedJson/shaped-json.h" #include "GeoIndex/GeoIndex.h" +#include "HashIndex/hashindex.h" +#include "SkipLists/skiplistIndex.h" #ifdef __cplusplus extern "C" { @@ -67,10 +69,38 @@ typedef TRI_voc_tick_t TRI_idx_iid_t; //////////////////////////////////////////////////////////////////////////////// typedef enum { - TRI_IDX_TYPE_GEO_INDEX + TRI_IDX_TYPE_PRIMARY_INDEX, + TRI_IDX_TYPE_GEO_INDEX, + TRI_IDX_TYPE_HASH_INDEX, + TRI_IDX_TYPE_SKIPLIST_INDEX } TRI_idx_type_e; +//////////////////////////////////////////////////////////////////////////////// +/// @brief geo index variants +//////////////////////////////////////////////////////////////////////////////// + +typedef enum { + INDEX_GEO_NONE = 0, + INDEX_GEO_INDIVIDUAL_LAT_LON, + INDEX_GEO_COMBINED_LAT_LON, + INDEX_GEO_COMBINED_LON_LAT +} +TRI_index_geo_variant_e; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief index definition struct as used by the query optimizer +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_index_definition_s { + TRI_idx_iid_t _iid; + TRI_idx_type_e _type; + TRI_vector_string_t* _fields; + bool _isUnique; + TRI_index_geo_variant_e _geoVariant; +} +TRI_index_definition_t; + //////////////////////////////////////////////////////////////////////////////// /// @brief index base class //////////////////////////////////////////////////////////////////////////////// @@ -104,6 +134,32 @@ typedef struct TRI_geo_index_s { } TRI_geo_index_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief hash index +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_hash_index_s { + TRI_index_t base; + + HashIndex* _hashIndex; // effectively the associative array + TRI_vector_t* _shapeList; // a list of shape pid which identifies the fields of the index + bool _unique; +} TRI_hash_index_t; + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief skiplist index +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_skiplist_index_s { + TRI_index_t base; + + SkiplistIndex* _skiplistIndex; // effectively the skiplist + TRI_vector_t* _shapeList; // a list of shape pid which identifies the fields of the index + bool _unique; +} TRI_skiplist_index_t; + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -133,6 +189,38 @@ bool TRI_RemoveIndex (struct TRI_doc_collection_s* collection, TRI_index_t* idx) bool TRI_SaveIndex (struct TRI_doc_collection_s*, TRI_index_t*); +//////////////////////////////////////////////////////////////////////////////// +/// @brief looks up an index identifier +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_LookupIndex (struct TRI_doc_collection_s*, TRI_idx_iid_t); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free an existing index definition +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeIndexDefinition (TRI_index_definition_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free an existing index definitions vector +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeIndexDefinitions (TRI_vector_pointer_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief gets the definitions of all index files for a collection +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_pointer_t* TRI_GetCollectionIndexes (const TRI_vocbase_t* vocbase, + const char* collectionName); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief gets the names of all index files for a collection +//////////////////////////////////////////////////////////////////////////////// + +TRI_vector_string_t TRI_GetCollectionIndexFiles (const TRI_vocbase_t* vocbase, + const char* collectionName); + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -213,6 +301,69 @@ GeoCoordinates* TRI_NearestGeoIndex (TRI_index_t*, double lon, size_t count); + + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- HASH INDEX +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + + +HashIndexElements* TRI_LookupHashIndex (TRI_index_t*, TRI_json_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a hash-index +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_CreateHashIndex (struct TRI_doc_collection_s*, + TRI_vector_t* shapeList, + bool unique); + + + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SKIPLIST INDEX +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + + +SkiplistIndexElements* TRI_LookupSkiplistIndex (TRI_index_t*, TRI_json_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a hash-index +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_CreateSkiplistIndex (struct TRI_doc_collection_s*, + TRI_vector_t* shapeList, + bool unique); + + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/VocBase/join-execute.c b/VocBase/join-execute.c index 3784cd0a0b..cfa1c125ae 100644 --- a/VocBase/join-execute.c +++ b/VocBase/join-execute.c @@ -34,25 +34,283 @@ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @brief Return data part type for a join part +/// @brief Determine which geo indexes to use in a query //////////////////////////////////////////////////////////////////////////////// -static inline TRI_select_part_e JoinPartDataPartType(const TRI_join_type_e type) { - if (type == JOIN_TYPE_LIST) { - return RESULT_PART_MULTI; +static TRI_data_feeder_t* DetermineGeoIndexUsage (const TRI_vocbase_t* vocbase, + const TRI_select_join_t* join, + const size_t level, + const TRI_join_part_t* part) { + TRI_vector_pointer_t* indexDefinitions; + TRI_index_definition_t* indexDefinition; + TRI_data_feeder_t* feeder = NULL; + size_t i; + + assert(part->_geoRestriction); + + indexDefinitions = TRI_GetCollectionIndexes(vocbase, part->_collectionName); + if (!indexDefinitions) { + return feeder; } - return RESULT_PART_SINGLE; + + // enum all indexes + for (i = 0; i < indexDefinitions->_length; i++) { + indexDefinition = (TRI_index_definition_t*) indexDefinitions->_buffer[i]; + + if (indexDefinition->_type != TRI_IDX_TYPE_GEO_INDEX) { + // ignore all indexes except geo indexes here + continue; + } + + if (indexDefinition->_fields->_length != 2) { + continue; + } + + if (strcmp(indexDefinition->_fields->_buffer[0], + part->_geoRestriction->_compareLat._field) != 0) { + continue; + } + + if (strcmp(indexDefinition->_fields->_buffer[1], + part->_geoRestriction->_compareLon._field) != 0) { + continue; + } + + feeder = + TRI_CreateDataFeederGeoLookup((TRI_doc_collection_t*) part->_collection, + (TRI_join_t*) join, + level, + part->_geoRestriction); + + if (feeder) { + // set up addtl data for feeder + feeder->_indexId = indexDefinition->_iid; + break; + } + } + + TRI_FreeIndexDefinitions(indexDefinitions); + + return feeder; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Determine which indexes to use in a query +//////////////////////////////////////////////////////////////////////////////// + +static TRI_data_feeder_t* DetermineIndexUsage (const TRI_vocbase_t* vocbase, + const TRI_select_join_t* join, + const size_t level, + const TRI_join_part_t* part) { + TRI_vector_pointer_t* indexDefinitions; + TRI_index_definition_t* indexDefinition; + TRI_data_feeder_t* feeder = NULL; + QL_optimize_range_t* range; + TRI_vector_pointer_t matches; + size_t i, j, k; + size_t numFieldsDefined; + size_t numFields; + size_t numConsts; + size_t indexLength = 0; + + assert(!part->_geoRestriction); + + if (part->_ranges) { + TRI_InitVectorPointer(&matches); + indexDefinitions = TRI_GetCollectionIndexes(vocbase, part->_collectionName); + if (!indexDefinitions) { + goto EXIT2; + } + + // enum all indexes + for (i = 0; i < indexDefinitions->_length; i++) { + indexDefinition = (TRI_index_definition_t*) indexDefinitions->_buffer[i]; + + if (indexDefinition->_type == TRI_IDX_TYPE_GEO_INDEX) { + // ignore all geo indexes here + continue; + } + + // reset compare state + if (matches._length) { + TRI_DestroyVectorPointer(&matches); + TRI_InitVectorPointer(&matches); + } + numFields = 0; + numConsts = 0; + + numFieldsDefined = indexDefinition->_fields->_length; + for (j = 0 ; j < numFieldsDefined; j++) { + // enumerate all fields from the index definition and + // check all ranges we found for the collection + + for (k = 0; k < part->_ranges->_length; k++) { + range = (QL_optimize_range_t*) part->_ranges->_buffer[k]; + // check if collection name matches + if (strcmp(range->_collection, part->_alias) != 0) { + continue; + } + + // check if field names match + if (strcmp(indexDefinition->_fields->_buffer[j], + range->_field) != 0) { + continue; + } + + if (indexDefinition->_type == TRI_IDX_TYPE_PRIMARY_INDEX || + indexDefinition->_type == TRI_IDX_TYPE_HASH_INDEX) { + // check if index can be used + // (primary and hash index only support equality comparisons) + if (range->_minStatus == RANGE_VALUE_INFINITE || + range->_maxStatus == RANGE_VALUE_INFINITE) { + // if this is an unbounded range comparison, continue + continue; + } + if (range->_valueType == RANGE_TYPE_DOUBLE && + range->_minValue._doubleValue != range->_maxValue._doubleValue) { + // if min double value != max value, continue + continue; + } + if ((range->_valueType == RANGE_TYPE_STRING || + range->_valueType == RANGE_TYPE_JSON) && + strcmp(range->_minValue._stringValue, + range->_maxValue._stringValue) != 0) { + // if min string value != max value, continue + continue; + } + } + + if ((range->_valueType == RANGE_TYPE_FIELD && numConsts > 0) || + (range->_valueType != RANGE_TYPE_FIELD && numFields > 0)) { + // cannot mix ref access and const access + continue; + } + + if (range->_valueType == RANGE_TYPE_FIELD) { + // we found a reference + numFields++; + } + else { + // we found a constant + numConsts++; + } + + // push this candidate onto the stack + TRI_PushBackVectorPointer(&matches, range); + break; + } + } + + if (matches._length == numFieldsDefined) { + // we have found as many matches as defined in the index definition + // that means the index is fully covered in the condition + + if (indexDefinition->_type == TRI_IDX_TYPE_PRIMARY_INDEX) { + // use the collection's primary index + if (feeder) { + // free any other feeder previously set up + feeder->free(feeder); + } + + feeder = + TRI_CreateDataFeederPrimaryLookup((TRI_doc_collection_t*) part->_collection, + (TRI_join_t*) join, + level); + if (feeder) { + // we always exit if we can use the primary index + // the primary index guarantees uniqueness + feeder->_ranges = TRI_CopyVectorPointer(&matches); + goto EXIT; + } + } + + if (indexLength < numFieldsDefined) { + // if the index found contains more fields than the one we previously found, + // we use the new one + // (assumption: the more fields index, the less selective is the index) + if (indexDefinition->_type == TRI_IDX_TYPE_HASH_INDEX || + indexDefinition->_type == TRI_IDX_TYPE_SKIPLIST_INDEX) { + // use a hash index defined for the collection + if (feeder) { + // free any other feeder previously set up + feeder->free(feeder); + } + + if (indexDefinition->_type == TRI_IDX_TYPE_SKIPLIST_INDEX) { + feeder = + TRI_CreateDataFeederSkiplistLookup((TRI_doc_collection_t*) part->_collection, + (TRI_join_t*) join, + level); + } + else { + feeder = + TRI_CreateDataFeederHashLookup((TRI_doc_collection_t*) part->_collection, + (TRI_join_t*) join, + level); + } + + if (feeder) { + // set up addtl data for feeder + feeder->_indexId = indexDefinition->_iid; + feeder->_ranges = TRI_CopyVectorPointer(&matches); + + // for further comparisons + indexLength = numFieldsDefined; + } + } + } + + } + } + +EXIT: + TRI_FreeIndexDefinitions(indexDefinitions); + TRI_DestroyVectorPointer(&matches); + } + +EXIT2: + + if (!feeder) { + // if no index can be used, we'll do a full table scan + feeder = TRI_CreateDataFeederTableScan((TRI_doc_collection_t*) part->_collection, + (TRI_join_t*) join, + level); + } + + return feeder; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Return document data part type for a join part +//////////////////////////////////////////////////////////////////////////////// + +static inline TRI_select_part_e GetDocumentDataPartType(const TRI_join_type_e type) { + if (type == JOIN_TYPE_LIST) { + return RESULT_PART_DOCUMENT_MULTI; + } + return RESULT_PART_DOCUMENT_SINGLE; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Return value data part type for a join part +//////////////////////////////////////////////////////////////////////////////// + +static inline TRI_select_part_e GetValueDataPartType(const TRI_join_type_e type) { + if (type == JOIN_TYPE_LIST) { + return RESULT_PART_VALUE_MULTI; + } + return RESULT_PART_VALUE_SINGLE; } //////////////////////////////////////////////////////////////////////////////// /// @brief Create a new select result from a join definition //////////////////////////////////////////////////////////////////////////////// -TRI_select_result_t* TRI_JoinSelectResult (TRI_select_join_t* join) { +TRI_select_result_t* TRI_JoinSelectResult (const TRI_vocbase_t* vocbase, + TRI_select_join_t* join) { TRI_select_result_t* result; TRI_vector_pointer_t* dataparts; TRI_select_datapart_t* datapart; - TRI_data_feeder_t* feeder; TRI_join_part_t* part; size_t i; bool error = false; @@ -65,31 +323,59 @@ TRI_select_result_t* TRI_JoinSelectResult (TRI_select_join_t* join) { TRI_InitVectorPointer(dataparts); for (i = 0; i < join->_parts._length; i++) { part = (TRI_join_part_t*) join->_parts._buffer[i]; - datapart = TRI_CreateDataPart(part->_alias, - part->_collection, - JoinPartDataPartType(part->_type)); - if (datapart) { - TRI_PushBackVectorPointer(dataparts, datapart); - } - else { - error = true; - } + if (part) { + datapart = TRI_CreateDataPart(part->_alias, + part->_collection, + GetDocumentDataPartType(part->_type), + 0); + if (datapart) { + TRI_PushBackVectorPointer(dataparts, datapart); + + // if result contains some artificial extra data, create an additional + // result part for it + if (part->_extraData._size) { + datapart = TRI_CreateDataPart(part->_extraData._alias, + NULL, + GetValueDataPartType(part->_type), + part->_extraData._size); + + if (datapart) { + TRI_PushBackVectorPointer(dataparts, datapart); + } + else { + error = true; + } + } + } + else { + error = true; + } + + // determine the access type (index usage/full table scan) for collection + if (part->_geoRestriction) { + part->_feeder = DetermineGeoIndexUsage(vocbase, join, i, part); + } + else { + part->_feeder = DetermineIndexUsage(vocbase, join, i, part); + } - feeder = TRI_CreateDataFeeder((TRI_doc_collection_t*) part->_collection); - if (feeder) { - part->_feeder = feeder; + if (!part->_feeder) { + error = true; + } } else { error = true; } } + // set up the data structures to retrieve the result documents result = TRI_CreateSelectResult(dataparts); if (!result) { error = true; } if (error) { + // clean up for (i = 0; i < dataparts->_length; i++) { datapart = (TRI_select_datapart_t*) dataparts->_buffer[i]; if (datapart) { @@ -157,7 +443,6 @@ static void RecursiveJoin (TRI_select_result_t* results, TRI_voc_ssize_t *limit) { TRI_join_part_t* part; TRI_data_feeder_t* feeder; - TRI_doc_mptr_t* document; size_t numJoins; bool joinMatch = false; @@ -179,19 +464,17 @@ static void RecursiveJoin (TRI_select_result_t* results, if (part->_type == JOIN_TYPE_LIST) { // join type is aggregate (list join) assert(level > 0); - part->_singleDocument = NULL; TRI_ClearVectorPointer(&part->_listDocuments); + TRI_ClearVectorPointer(&part->_extraData._listValues); while (true) { // get next document - document = feeder->current(feeder); - if (!document) { + if (!feeder->current(feeder)) { // end of documents in collection // exit this join break; } - part->_singleDocument = document; if (part->_condition && part->_context) { // check ON clause if (!CheckJoinClause(join, level)) { @@ -200,7 +483,8 @@ static void RecursiveJoin (TRI_select_result_t* results, } // push documents into vector - TRI_PushBackVectorPointer(&part->_listDocuments, document); + TRI_PushBackVectorPointer(&part->_listDocuments, part->_singleDocument); + TRI_PushBackVectorPointer(&part->_extraData._listValues, part->_extraData._singleValue); } // all documents collected in vector @@ -242,21 +526,19 @@ static void RecursiveJoin (TRI_select_result_t* results, while (true) { // get next document - document = feeder->current(feeder); - - if (!document) { + if (!feeder->current(feeder)) { // end of documents in collection // exit this join break; } - part->_singleDocument = document; if (level > 0 && part->_condition && part->_context) { // check ON clause if (!CheckJoinClause(join, level)) { if (part->_type == JOIN_TYPE_OUTER) { // set document to null in outer join part->_singleDocument = NULL; + part->_extraData._singleValue = NULL; // left join: if we are not at the last document of the left // joined collection, we continue @@ -326,7 +608,13 @@ void TRI_ExecuteJoins (TRI_select_result_t* results, // (values will be decreased during join execution) _skip = skip; _limit = limit; - + + for (i = 0; i < join->_parts._length; i++) { + part = (TRI_join_part_t*) join->_parts._buffer[i]; + assert(part->_feeder); + + part->_feeder->init(part->_feeder); + } // execute the join RecursiveJoin(results, join, 0, where, context, &_skip, &_limit); @@ -337,9 +625,15 @@ void TRI_ExecuteJoins (TRI_select_result_t* results, if (part->_type == JOIN_TYPE_LIST) { TRI_DestroyVectorPointer(&part->_listDocuments); part->_listDocuments._buffer = NULL; + + TRI_DestroyVectorPointer(&part->_extraData._listValues); + part->_extraData._listValues._buffer = NULL; } + if (part->_feeder) { + // free data feeder early, we don't need it any longer part->_feeder->free(part->_feeder); + part->_feeder = NULL; } } } diff --git a/VocBase/join-execute.h b/VocBase/join-execute.h index 58e23b500e..0975a3482e 100644 --- a/VocBase/join-execute.h +++ b/VocBase/join-execute.h @@ -31,6 +31,8 @@ #include "VocBase/select-result.h" #include "VocBase/join.h" #include "VocBase/data-feeder.h" +#include "QL/optimize.h" +#include "QL/ast-query.h" #include "V8/v8-c-utils.h" #ifdef __cplusplus @@ -46,7 +48,8 @@ extern "C" { /// @brief Create a new select result from a join definition //////////////////////////////////////////////////////////////////////////////// -TRI_select_result_t* TRI_JoinSelectResult (TRI_select_join_t*); +TRI_select_result_t* TRI_JoinSelectResult (const TRI_vocbase_t*, + TRI_select_join_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief Execute joins diff --git a/VocBase/join.c b/VocBase/join.c index 3fd0d04110..8c32348c33 100644 --- a/VocBase/join.c +++ b/VocBase/join.c @@ -32,6 +32,22 @@ /// @{ //////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// +/// @brief get size of extra data in standard join parts +//////////////////////////////////////////////////////////////////////////////// + +static size_t GetExtraDataSizeVoid (TRI_join_part_t* part) { + return 0; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get size of extra data in geo join parts +//////////////////////////////////////////////////////////////////////////////// + +static size_t GetExtraDataSizeGeo (TRI_join_part_t* part) { + return sizeof(double); +} + //////////////////////////////////////////////////////////////////////////////// /// @brief Free join part memory //////////////////////////////////////////////////////////////////////////////// @@ -41,9 +57,17 @@ static void FreePart (TRI_join_part_t* part) { TRI_Free(part->_alias); } + if (part->_ranges) { + // TODO: free ranges + } + if (part->_collectionName) { TRI_Free(part->_collectionName); } + + if (part->_condition) { + part->_condition->free(part->_condition); + } if (part->_feeder) { part->_feeder->free(part->_feeder); @@ -81,9 +105,13 @@ static void FreeSelectJoin (TRI_select_join_t* join) { /// @brief Add a part to a select join //////////////////////////////////////////////////////////////////////////////// -bool TRI_AddPartSelectJoin (TRI_select_join_t* join, const TRI_join_type_e type, - TRI_qry_where_t* condition, char* collectionName, - char* alias) { +bool TRI_AddPartSelectJoin (TRI_select_join_t* join, + const TRI_join_type_e type, + TRI_qry_where_t* condition, + TRI_vector_pointer_t* ranges, + char* collectionName, + char* alias, + QL_ast_query_geo_restriction_t* geoRestriction) { TRI_join_part_t* part; TRI_qry_where_general_t* conditionGeneral; @@ -102,15 +130,26 @@ bool TRI_AddPartSelectJoin (TRI_select_join_t* join, const TRI_join_type_e type, part->_feeder = NULL; part->_type = type; part->_condition = condition; + part->_ranges = ranges; part->_collection = NULL; part->_collectionName = TRI_DuplicateString(collectionName); part->_alias = TRI_DuplicateString(alias); + part->_geoRestriction = geoRestriction; if (part->_condition != NULL && part->_condition->_type == TRI_QRY_WHERE_GENERAL) { conditionGeneral = (TRI_qry_where_general_t*) part->_condition; part->_context = TRI_CreateExecutionContext(conditionGeneral->_code); } - + + // determine size of extra data to store + if (part->_geoRestriction) { + part->_extraData._size = GetExtraDataSizeGeo(part); + part->_extraData._alias = part->_geoRestriction->_alias; + } + else { + part->_extraData._size = GetExtraDataSizeVoid(part); + part->_extraData._alias = NULL; + } part->free = FreePart; TRI_PushBackVectorPointer(&join->_parts, part); diff --git a/VocBase/join.h b/VocBase/join.h index 3c72569e58..eeb47e12c5 100644 --- a/VocBase/join.h +++ b/VocBase/join.h @@ -66,11 +66,19 @@ typedef struct TRI_join_part_s { TRI_data_feeder_t *_feeder; // data source TRI_join_type_e _type; TRI_qry_where_t* _condition; + TRI_vector_pointer_t* _ranges; TRI_doc_collection_t* _collection; char* _collectionName; char* _alias; + QL_ast_query_geo_restriction_t* _geoRestriction; TRI_doc_mptr_t* _singleDocument; TRI_vector_pointer_t _listDocuments; + struct { + size_t _size; + char* _alias; + void* _singleValue; + TRI_vector_pointer_t _listValues; + } _extraData; TRI_js_exec_context_t _context; void (*free) (struct TRI_join_part_s*); @@ -83,6 +91,7 @@ TRI_join_part_t; typedef struct TRI_select_join_s { TRI_vector_pointer_t _parts; + TRI_vocbase_t* _vocbase; void (*free) (struct TRI_select_join_s*); } @@ -95,8 +104,10 @@ TRI_select_join_t; bool TRI_AddPartSelectJoin (TRI_select_join_t*, const TRI_join_type_e, TRI_qry_where_t*, + TRI_vector_pointer_t*, char*, - char*); + char*, + QL_ast_query_geo_restriction_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief Create a new join diff --git a/VocBase/query-base.c b/VocBase/query-base.c new file mode 100644 index 0000000000..40f966afb8 --- /dev/null +++ b/VocBase/query-base.c @@ -0,0 +1,793 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief Basic query data structures +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "VocBase/query.h" +#include "VocBase/query-base.h" +#include "VocBase/query-parse.h" + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Hash function used to hash bind parameter names +//////////////////////////////////////////////////////////////////////////////// + +static uint64_t HashBindParameterName (TRI_associative_pointer_t* array, + void const* key) { + return TRI_FnvHashString((char const*) key); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Hash function used to hash bind parameters +//////////////////////////////////////////////////////////////////////////////// + +static uint64_t HashBindParameter (TRI_associative_pointer_t* array, + void const* element) { + TRI_bind_parameter_t* parameter = (TRI_bind_parameter_t*) element; + + return TRI_FnvHashString(parameter->_name); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Comparison function used to determine bind parameter equality +//////////////////////////////////////////////////////////////////////////////// + +static bool EqualBindParameter (TRI_associative_pointer_t* array, + void const* key, + void const* element) { + TRI_bind_parameter_t* parameter = (TRI_bind_parameter_t*) element; + + return TRI_EqualString(key, parameter->_name); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free all bind parameters in associative array +//////////////////////////////////////////////////////////////////////////////// + +static void FreeBindParameters (TRI_associative_pointer_t* array) { + TRI_bind_parameter_t* parameter; + size_t i; + + for (i = 0; i < array->_nrAlloc; i++) { + parameter = (TRI_bind_parameter_t*) array->_table[i]; + if (parameter) { + TRI_FreeBindParameter(parameter); + } + } +} + +// ----------------------------------------------------------------------------- +// --SECTION-- bind parameters +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free a single bind parameter +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeBindParameter (TRI_bind_parameter_t* const parameter) { + assert(parameter); + + if (parameter->_name) { + TRI_Free(parameter->_name); + } + + if (parameter->_data) { + TRI_FreeJson(parameter->_data); + } + + TRI_Free(parameter); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a bind parameter +//////////////////////////////////////////////////////////////////////////////// + +TRI_bind_parameter_t* TRI_CreateBindParameter (const char* name, + const TRI_json_t* data) { + TRI_bind_parameter_t* parameter; + + assert(name); + assert(data); + + parameter = (TRI_bind_parameter_t*) TRI_Allocate(sizeof(TRI_bind_parameter_t)); + if (!parameter) { + return NULL; + } + + parameter->_name = TRI_DuplicateString(name); + if (!parameter->_name) { + TRI_Free(parameter); + return NULL; + } + + parameter->_data = TRI_CopyJson((TRI_json_t*) data); + if (!parameter->_data) { + TRI_Free(parameter->_name); + TRI_Free(parameter); + return NULL; + } + + return parameter; +} + +// ----------------------------------------------------------------------------- +// --SECTION-- query template +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Add a bind parameter to a query template +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_AddBindParameterQueryTemplate (TRI_query_template_t* const template_, + const TRI_bind_parameter_t* const parameter) { + assert(template_); + + if (TRI_LookupByKeyAssociativePointer(&template_->_bindParameters, + parameter->_name)) { + return false; + } + + TRI_InsertKeyAssociativePointer(&template_->_bindParameters, + parameter->_name, + (void*) parameter, + true); + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a query template +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_template_t* TRI_CreateQueryTemplate (const char* query, + const TRI_vocbase_t* const vocbase) { + TRI_query_template_t* template_; + + assert(query); + assert(vocbase); + + template_ = (TRI_query_template_t*) TRI_Allocate(sizeof(TRI_query_template_t)); + if (!template_) { + return NULL; + } + + template_->_queryString = TRI_DuplicateString(query); + if (!template_->_queryString) { + TRI_Free(template_); + return NULL; + } + + template_->_query = (QL_ast_query_t*) TRI_Allocate(sizeof(QL_ast_query_t)); + if (!template_->_query) { + TRI_Free(template_->_queryString); + TRI_Free(template_); + return NULL; + } + + template_->_vocbase = (TRI_vocbase_t*) vocbase; + TRI_InitQueryError(&template_->_error); + + TRI_InitAssociativePointer(&template_->_bindParameters, + HashBindParameterName, + HashBindParameter, + EqualBindParameter, + 0); + + // init vectors needed for book-keeping memory + TRI_InitVectorPointer(&template_->_memory._nodes); + TRI_InitVectorPointer(&template_->_memory._strings); + TRI_InitVectorPointer(&template_->_memory._listHeads); + TRI_InitVectorPointer(&template_->_memory._listTails); + + QLAstQueryInit(template_->_query); + + return template_; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free a query template +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeQueryTemplate (TRI_query_template_t* const template_) { + void* nodePtr; + char* stringPtr; + size_t i; + + assert(template_); + assert(template_->_queryString); + assert(template_->_query); + + QLAstQueryFree(template_->_query); + TRI_Free(template_->_query); + + // nodes + i = template_->_memory._nodes._length; + // free all nodes in vector, starting at the end (prevents copying the remaining elements in vector) + while (i > 0) { + i--; + nodePtr = TRI_RemoveVectorPointer(&template_->_memory._nodes, i); + TRI_ParseQueryFreeNode(nodePtr); + if (i == 0) { + break; + } + } + + // strings + i = template_->_memory._strings._length; + // free all strings in vector, starting at the end (prevents copying the remaining elements in vector) + while (i > 0) { + i--; + stringPtr = TRI_RemoveVectorPointer(&template_->_memory._strings, i); + TRI_ParseQueryFreeString(stringPtr); + if (i == 0) { + break; + } + } + + // list elements in _listHeads and _listTails must not be freed separately as they are AstNodes handled + // by _nodes already + + // free vectors themselves + TRI_DestroyVectorPointer(&template_->_memory._strings); + TRI_DestroyVectorPointer(&template_->_memory._nodes); + TRI_DestroyVectorPointer(&template_->_memory._listHeads); + TRI_DestroyVectorPointer(&template_->_memory._listTails); + + TRI_Free(template_->_queryString); + + TRI_FreeQueryError(&template_->_error); + + FreeBindParameters(&template_->_bindParameters); + TRI_DestroyAssociativePointer(&template_->_bindParameters); + + TRI_Free(template_); +} + +// ----------------------------------------------------------------------------- +// --SECTION-- query instance +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create javascript function code for a query part +//////////////////////////////////////////////////////////////////////////////// + +static char* GetJavascriptFunctionCode (const TRI_query_node_t* const node) { + TRI_query_javascript_converter_t* js; + char* function = NULL; + + assert(node); + js = TRI_InitQueryJavascript(); + + if (js) { + TRI_AppendStringStringBuffer(js->_buffer, "(function($) { return "); + TRI_ConvertQueryJavascript(js, node); + TRI_AppendStringStringBuffer(js->_buffer, " })"); + + function = TRI_DuplicateString(js->_buffer->_buffer); + TRI_FreeQueryJavascript(js); + } + + return function; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create javascript function code for the order part +//////////////////////////////////////////////////////////////////////////////// + +static char* GetJavascriptOrderFunctionCode (const TRI_query_node_t* const node) { + TRI_query_javascript_converter_t* js; + char* function = NULL; + + assert(node); + js = TRI_InitQueryJavascript(); + + if (js) { + TRI_AppendStringStringBuffer(js->_buffer, "(function($) { var lhs, rhs; "); + TRI_ConvertOrderQueryJavascript(js, node); + TRI_AppendStringStringBuffer(js->_buffer, " })"); + + function = TRI_DuplicateString(js->_buffer->_buffer); + TRI_FreeQueryJavascript(js); + } + + return function; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the select part of the query +//////////////////////////////////////////////////////////////////////////////// + +static TRI_qry_select_t* GetSelectPart (TRI_query_instance_t* instance) { + TRI_qry_select_t* select_ = NULL; + QL_ast_query_select_type_e selectType; + char* functionCode; + + assert(instance); + + selectType = instance->_template->_query->_select._type; + + if (selectType == QLQuerySelectTypeSimple) { + select_ = TRI_CreateQuerySelectDocument(); + } + else if (selectType == QLQuerySelectTypeEvaluated) { + functionCode = GetJavascriptFunctionCode(instance->_template->_query->_select._base); + if (functionCode) { + select_ = TRI_CreateQuerySelectGeneral(functionCode); + TRI_Free(functionCode); + } + } + + if (select_ == NULL) { + TRI_RegisterErrorQueryInstance(instance, TRI_ERROR_QUERY_OOM, NULL); + } + + return select_; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the where part of the query +//////////////////////////////////////////////////////////////////////////////// + +static TRI_qry_where_t* GetWherePart (TRI_query_instance_t* instance) { + TRI_qry_where_t* where = NULL; + QL_ast_query_where_type_e whereType; + char* functionCode; + + assert(instance); + + whereType = instance->_template->_query->_where._type; + + if (whereType == QLQueryWhereTypeAlwaysTrue) { + // where condition is always true + where = TRI_CreateQueryWhereBoolean(true); + } + else if (whereType == QLQueryWhereTypeAlwaysFalse) { + // where condition is always false + where = TRI_CreateQueryWhereBoolean(false); + } + else { + // where condition must be evaluated for each result + functionCode = GetJavascriptFunctionCode(instance->_template->_query->_where._base); + if (functionCode) { + where = TRI_CreateQueryWhereGeneral(functionCode); + TRI_Free(functionCode); + } + } + + if (where == NULL) { + TRI_RegisterErrorQueryInstance(instance, TRI_ERROR_QUERY_OOM, NULL); + } + + return where; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the order part of the query +//////////////////////////////////////////////////////////////////////////////// + +static TRI_qry_order_t* GetOrderPart (TRI_query_instance_t* instance) { + TRI_qry_order_t* order = NULL; + QL_ast_query_order_type_e orderType; + char* functionCode; + + assert(instance); + + orderType = instance->_template->_query->_order._type; + + if (orderType == QLQueryOrderTypeNone) { + // no order by + return NULL; + } + + functionCode = GetJavascriptOrderFunctionCode(instance->_template->_query->_order._base->_next); + if (functionCode) { + order = TRI_CreateQueryOrderGeneral(functionCode); + TRI_Free(functionCode); + } + + if (order == NULL) { + TRI_RegisterErrorQueryInstance(instance, TRI_ERROR_QUERY_OOM, NULL); + } + + return order; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the skip part of the query +//////////////////////////////////////////////////////////////////////////////// + +static TRI_voc_size_t GetSkip (TRI_query_instance_t* instance) { + assert(instance); + + if (instance->_template->_query->_limit._isUsed) { + return (TRI_voc_size_t) instance->_template->_query->_limit._offset; + } + return TRI_QRY_NO_SKIP; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the skip part of the query +//////////////////////////////////////////////////////////////////////////////// + +TRI_voc_ssize_t GetLimit (TRI_query_instance_t* instance) { + assert(instance); + + if (instance->_template->_query->_limit._isUsed) { + return (TRI_voc_ssize_t) instance->_template->_query->_limit._count; + } + return TRI_QRY_NO_LIMIT; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the join part of the query +//////////////////////////////////////////////////////////////////////////////// + +TRI_select_join_t* GetJoins (TRI_query_instance_t* instance) { + TRI_select_join_t* join = NULL; + TRI_vector_pointer_t* ranges; + TRI_join_type_e joinType; + TRI_query_node_t* node; + TRI_query_node_t* lhs; + TRI_query_node_t* rhs; + TRI_query_node_t* ref; + TRI_query_node_t* condition; + QL_ast_query_collection_t* collection; + QL_ast_query_where_type_e conditionType; + TRI_qry_where_t* joinWhere; + TRI_query_javascript_converter_t* conditionJs; + char* collectionName; + char* collectionAlias; + + assert(instance); + + join = TRI_CreateSelectJoin(); + if (!join) { + return NULL; + } + + node = instance->_template->_query->_from._base; + node = node->_next; + + assert(node); + + // primary table + lhs = node->_lhs; + rhs = node->_rhs; + collectionName = lhs->_value._stringValue; + collectionAlias = rhs->_value._stringValue; + + collection = (QL_ast_query_collection_t*) + TRI_LookupByKeyAssociativePointer(&instance->_template->_query->_from._collections, collectionAlias); + + if (collection->_geoRestriction) { + ranges = NULL; + } + else { + ranges = QLOptimizeCondition(instance->_template->_query->_where._base); + } + + TRI_AddPartSelectJoin(join, + JOIN_TYPE_PRIMARY, + NULL, + ranges, + collectionName, + collectionAlias, + QLAstQueryCloneRestriction(collection->_geoRestriction)); + + while (node->_next) { + node = node->_next; + ref = node->_lhs; + condition = node->_rhs; + + conditionType = QLOptimizeGetWhereType(condition); + + joinWhere = NULL; + ranges = NULL; + + collectionName = ref->_lhs->_value._stringValue; + collectionAlias = ref->_rhs->_value._stringValue; + + collection = (QL_ast_query_collection_t*) + TRI_LookupByKeyAssociativePointer(&instance->_template->_query->_from._collections, collectionAlias); + + if (conditionType == QLQueryWhereTypeAlwaysTrue) { + // join condition is always true + joinWhere = TRI_CreateQueryWhereBoolean(true); + if (!joinWhere) { + join->free(join); + return NULL; + } + } + else if (conditionType == QLQueryWhereTypeAlwaysFalse) { + // join condition is always false + joinWhere = TRI_CreateQueryWhereBoolean(false); + if (!joinWhere) { + join->free(join); + return NULL; + } + } + else { + // join condition must be evaluated for each result + conditionJs = TRI_InitQueryJavascript(); + if (conditionJs) { + TRI_AppendStringStringBuffer(conditionJs->_buffer, "(function($) { return ("); + TRI_ConvertQueryJavascript(conditionJs, condition); + TRI_AppendStringStringBuffer(conditionJs->_buffer, "); })"); + joinWhere = TRI_CreateQueryWhereGeneral(conditionJs->_buffer->_buffer); + TRI_FreeQueryJavascript(conditionJs); + if (!collection->_geoRestriction) { + ranges = QLOptimizeCondition(condition); + } + } + if (!joinWhere) { + join->free(join); + return NULL; + } + } + + if (node->_type == TRI_QueryNodeJoinList) { + joinType = JOIN_TYPE_LIST; + } + else if (node->_type == TRI_QueryNodeJoinInner) { + joinType = JOIN_TYPE_INNER; + } + else if (node->_type == TRI_QueryNodeJoinLeft) { + joinType = JOIN_TYPE_OUTER; + } + else { + assert(false); + } + + TRI_AddPartSelectJoin(join, + joinType, + joinWhere, + ranges, + collectionName, + collectionAlias, + QLAstQueryCloneRestriction(collection->_geoRestriction)); + } + + return join; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Set the value of a bind parameter +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_AddBindParameterQueryInstance (TRI_query_instance_t* const instance, + const TRI_bind_parameter_t* const parameter) { + assert(instance); + assert(parameter); + assert(parameter->_name); + assert(parameter->_data); + + // check if template has bind parameter defined + if (!TRI_LookupByKeyAssociativePointer(&instance->_template->_bindParameters, + parameter->_name)) { + // invalid bind parameter + TRI_RegisterErrorQueryInstance(instance, + TRI_ERROR_QUERY_BIND_PARAMETER_UNDECLARED, + parameter->_name); + return false; + } + + // check if bind parameter is already defined for instance + if (!TRI_LookupByKeyAssociativePointer(&instance->_bindParameters, + parameter->_name)) { + // bind parameter defined => duplicate definition + TRI_RegisterErrorQueryInstance(instance, + TRI_ERROR_QUERY_BIND_PARAMETER_REDECLARED, + parameter->_name); + return false; + } + + TRI_InsertKeyAssociativePointer(&instance->_bindParameters, + parameter->_name, + (void*) parameter, + true); + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free a query instance +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeQueryInstance (TRI_query_instance_t* const instance) { + assert(instance); + assert(instance->_template); + + TRI_FreeQueryError(&instance->_error); + + FreeBindParameters(&instance->_bindParameters); + TRI_DestroyAssociativePointer(&instance->_bindParameters); + + TRI_Free(instance); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a query instance +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_instance_t* TRI_CreateQueryInstance (const TRI_query_template_t* const template_) { + TRI_query_instance_t* instance; + + assert(template_); + + instance = (TRI_query_instance_t*) TRI_Allocate(sizeof(TRI_query_instance_t)); + if (!instance) { + return NULL; + } + + instance->_template = (TRI_query_template_t*) template_; + + // init values + instance->_wasKilled = false; + instance->_doAbort = false; + + TRI_InitQueryError(&instance->_error); + + TRI_InitAssociativePointer(&instance->_bindParameters, + HashBindParameterName, + HashBindParameter, + EqualBindParameter, + 0); + + instance->_query = TRI_CreateQuery(instance->_template->_vocbase, + GetSelectPart(instance), + GetWherePart(instance), + GetOrderPart(instance), + GetJoins(instance), + GetSkip(instance), + GetLimit(instance)); + + if (!instance->_query) { + TRI_FreeQueryInstance(instance); + return NULL; + } + + return instance; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Register an error during query execution +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RegisterErrorQueryInstance (TRI_query_instance_t* const instance, + const int code, + const char* data) { + + assert(instance); + assert(code > 0); + + TRI_SetQueryError(&instance->_error, code, data); + + // set abort flag + instance->_doAbort = true; + + return false; +} + +// ----------------------------------------------------------------------------- +// --SECTION-- errors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Register an error +//////////////////////////////////////////////////////////////////////////////// + +void TRI_SetQueryError (TRI_query_error_t* const error, + const int code, + const char* data) { + assert(code > 0); + + if (TRI_GetCodeQueryError(error) == 0) { + // do not overwrite previous error + TRI_set_errno(code); + error->_code = code; + error->_message = (char*) TRI_last_error(); + if (data) { + error->_data = TRI_DuplicateString(data); + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the error code registered last +//////////////////////////////////////////////////////////////////////////////// + +int TRI_GetCodeQueryError (const TRI_query_error_t* const error) { + assert(error); + + return error->_code; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the error string registered last +//////////////////////////////////////////////////////////////////////////////// + +char* TRI_GetStringQueryError (const TRI_query_error_t* const error) { + char* message = NULL; + char buffer[1024]; + int code; + + assert(error); + code = TRI_GetCodeQueryError(error); + if (!code) { + return NULL; + } + + message = error->_message; + if (!message) { + return NULL; + } + + if (error->_data && (NULL != strstr(message, "%s"))) { + snprintf(buffer, sizeof(buffer), message, error->_data); + return TRI_DuplicateString((const char*) &buffer); + } + + return TRI_DuplicateString(message); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialize an error structure +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitQueryError (TRI_query_error_t* const error) { + assert(error); + + error->_code = 0; + error->_data = NULL; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free an error structure +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeQueryError (TRI_query_error_t* const error) { + assert(error); + + if (error->_data) { + TRI_Free(error->_data); + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/VocBase/query-base.h b/VocBase/query-base.h new file mode 100644 index 0000000000..b2dbc0a0a6 --- /dev/null +++ b/VocBase/query-base.h @@ -0,0 +1,271 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief Basic query data structures +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#ifndef TRIAGENS_DURHAM_VOC_BASE_QUERY_BASE_H +#define TRIAGENS_DURHAM_VOC_BASE_QUERY_BASE_H 1 + +#include +#include +#include +#include +#include +#include + +#include "VocBase/query.h" +#include "VocBase/query-node.h" +#include "VocBase/query-error.h" +#include "VocBase/vocbase.h" + +#include "QL/parser.h" +#include "QL/ast-query.h" + +#ifdef __cplusplus +extern "C" { +#endif + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- query errors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief query error structure +/// +/// This struct is used to hold information about errors that happen during +/// query execution. The data will be passed to the end user. +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_query_error_s { + int _code; + char* _message; + char* _data; +} +TRI_query_error_t; + +// ----------------------------------------------------------------------------- +// --SECTION-- bind parameters +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Query bind parameter +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_bind_parameter_s { + char* _name; + TRI_json_t* _data; +} +TRI_bind_parameter_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a bind parameter +//////////////////////////////////////////////////////////////////////////////// + +TRI_bind_parameter_t* TRI_CreateBindParameter (const char*, const TRI_json_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free a bind parameter +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeBindParameter (TRI_bind_parameter_t* const); + +// ----------------------------------------------------------------------------- +// --SECTION-- query template +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief lexer state +/// +/// This struct contains the current lexer / scanner state. It contains +/// positioning information (pointer into query string, remaining length) +/// because flex processes strings in chunks of 8k by default. +/// +/// Each lexer instance will have its own struct instance to support reentrancy. +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_query_parser_s { + void* _scanner; + char* _buffer; + int _length; +} +TRI_query_parser_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief query template structure +/// +/// A query template is a blueprint for a query execution. It is abstract in the +/// sense that it does not contain any bind parameter values and no result set. +/// A query instance (@ref TRI_query_instance_t) can be created from a query +/// template. +/// +/// The template contains vectors that contain locations of allocated memory. +/// This is especially important because in case of parse errors, bison / flex +/// will not automatically free any allocated memory. +/// This has to be done manually, and that is what the vectors are used for. +/// There is a vector for AST nodes and a vector for strings +/// (used to keep track of string literals used in the query). There are also +/// two vectors to keep track of list elements (arrays / objects) in queries. +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_query_template_s { + char* _queryString; + QL_ast_query_t* _query; + TRI_vocbase_t* _vocbase; + TRI_query_parser_t* _parser; + struct { + TRI_vector_pointer_t _nodes; // memory locations of allocated AST nodes + TRI_vector_pointer_t _strings; // memory locations of allocated strings + TRI_vector_pointer_t _listHeads; // start of lists + TRI_vector_pointer_t _listTails; // end of lists + } _memory; + TRI_query_error_t _error; + TRI_associative_pointer_t _bindParameters; +} +TRI_query_template_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Add a bind parameter to a query template +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_AddBindParameterQueryTemplate (TRI_query_template_t* const, + const TRI_bind_parameter_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a query template +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_template_t* TRI_CreateQueryTemplate (const char*, + const TRI_vocbase_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free a query template +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeQueryTemplate (TRI_query_template_t* const); + +// ----------------------------------------------------------------------------- +// --SECTION-- query instance +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief query instance structure +/// +/// A query instance is a concrete query that has specific bind parameter values +/// and a specific result set +/// This struct is used to hold information about errors that happen during +/// query execution. The data will be passed to the end user. +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_query_instance_s { + TRI_query_template_t* _template; + bool _wasKilled; + bool _doAbort; + TRI_query_error_t _error; + TRI_associative_pointer_t _bindParameters; + + TRI_query_t* _query; +} +TRI_query_instance_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Set the value of a bind parameter +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_AddBindParameterQueryInstance (TRI_query_instance_t* const, + const TRI_bind_parameter_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free a query instance +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeQueryInstance (TRI_query_instance_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create a query instance +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_instance_t* TRI_CreateQueryInstance (const TRI_query_template_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Register an error during query execution +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_RegisterErrorQueryInstance (TRI_query_instance_t* const, + const int, + const char*); + +// ----------------------------------------------------------------------------- +// --SECTION-- errors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Register an error +//////////////////////////////////////////////////////////////////////////////// + +void TRI_SetQueryError (TRI_query_error_t* const, const int, const char*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the error code registered last +//////////////////////////////////////////////////////////////////////////////// + +int TRI_GetCodeQueryError (const TRI_query_error_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Get the error string registered last +//////////////////////////////////////////////////////////////////////////////// + +char* TRI_GetStringQueryError (const TRI_query_error_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialize an error structure +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitQueryError (TRI_query_error_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free an error structure +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeQueryError (TRI_query_error_t* const); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/VocBase/query-error.c b/VocBase/query-error.c new file mode 100644 index 0000000000..a5d34a8218 --- /dev/null +++ b/VocBase/query-error.c @@ -0,0 +1,72 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief query errors +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "VocBase/query-error.h" + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialize query error definitions +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitialiseQueryErrors (void) { + REG_ERROR(OOM, "out of memory"); + REG_ERROR(PARSE, "parse error: %s"); + REG_ERROR(EMPTY, "query is empty"); + REG_ERROR(NUMBER_OUT_OF_RANGE, "number '%s' is out of range"); + REG_ERROR(LIMIT_VALUE_OUT_OF_RANGE, "limit value '%s' is out of range"); + + REG_ERROR(COLLECTION_NAME_INVALID, "collection name '%s' is invalid"); + REG_ERROR(COLLECTION_ALIAS_INVALID, "collection alias '%s' is invalid"); + REG_ERROR(COLLECTION_ALIAS_REDECLARED, "collection alias '%s' is declared multiple times in the same query"); + REG_ERROR(COLLECTION_ALIAS_UNDECLARED, "collection alias '%s' is used but was not declared in the from clause"); + + REG_ERROR(GEO_RESTRICTION_INVALID, "geo restriction for alias '%s' is invalid"); + REG_ERROR(GEO_INDEX_MISSING, "no suitable geo index found for geo restriction on '%s'"); + + REG_ERROR(BIND_PARAMETER_MISSING, "no value specified for bind parameter '%s'"); + REG_ERROR(BIND_PARAMETER_REDECLARED, "value for bind parameter '%s' is declared multiple times"); + REG_ERROR(BIND_PARAMETER_UNDECLARED, "bind parameter '%s' was not declared in the query"); + REG_ERROR(BIND_PARAMETER_VALUE_INVALID, "invalid value for bind parameter '%s'"); + REG_ERROR(BIND_PARAMETER_NUMBER_OUT_OF_RANGE, "bind parameter number '%s' out of range"); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/VocBase/query-error.h b/VocBase/query-error.h new file mode 100644 index 0000000000..37bd1ddcaf --- /dev/null +++ b/VocBase/query-error.h @@ -0,0 +1,102 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief query errors +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#ifndef DURHAM_STORAGE_VOCBASE_QUERY_ERROR_H +#define DURHAM_STORAGE_VOCBASE_QUERY_ERROR_H 1 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- definitions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief error numbers for specific errors during query parsing and execution +/// +/// note that the error numbers defined here must not conflict with error +/// numbers defined for other parts of the program (e.g. in VocBase/vocbase.h) +//////////////////////////////////////////////////////////////////////////////// + +#define TRI_ERROR_QUERY_OOM (8000) +#define TRI_ERROR_QUERY_PARSE (8001) +#define TRI_ERROR_QUERY_EMPTY (8002) +#define TRI_ERROR_QUERY_NUMBER_OUT_OF_RANGE (8010) +#define TRI_ERROR_QUERY_LIMIT_VALUE_OUT_OF_RANGE (8011) + +#define TRI_ERROR_QUERY_COLLECTION_NAME_INVALID (8050) +#define TRI_ERROR_QUERY_COLLECTION_ALIAS_INVALID (8051) +#define TRI_ERROR_QUERY_COLLECTION_ALIAS_REDECLARED (8052) +#define TRI_ERROR_QUERY_COLLECTION_ALIAS_UNDECLARED (8053) + +#define TRI_ERROR_QUERY_GEO_RESTRICTION_INVALID (8070) +#define TRI_ERROR_QUERY_GEO_INDEX_MISSING (8071) + +#define TRI_ERROR_QUERY_BIND_PARAMETER_MISSING (8100) +#define TRI_ERROR_QUERY_BIND_PARAMETER_REDECLARED (8101) +#define TRI_ERROR_QUERY_BIND_PARAMETER_UNDECLARED (8102) +#define TRI_ERROR_QUERY_BIND_PARAMETER_VALUE_INVALID (8103) +#define TRI_ERROR_QUERY_BIND_PARAMETER_NUMBER_OUT_OF_RANGE (8104) + +//////////////////////////////////////////////////////////////////////////////// +/// @brief helper macro to define an error string +//////////////////////////////////////////////////////////////////////////////// + +#define REG_ERROR(id, label) TRI_set_errno_string(TRI_ERROR_QUERY_ ## id, label); + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialize query error definitions +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitialiseQueryErrors (void); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/VocBase/query-javascript.c b/VocBase/query-javascript.c new file mode 100644 index 0000000000..f2fa559489 --- /dev/null +++ b/VocBase/query-javascript.c @@ -0,0 +1,301 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief AST to javascript-string conversion functions +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "VocBase/query-javascript.h" + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Walk a horizontal list of elements and print them +//////////////////////////////////////////////////////////////////////////////// + +static void TRI_WalkListQueryJavascript (TRI_query_javascript_converter_t* converter, + const TRI_query_node_t* const node, + const char separator, + size_t counter) { + TRI_query_node_t* next; + + if (!node) { + return; + } + + next = node->_next; + + while (next) { + if (counter++ > 0) { + TRI_AppendCharStringBuffer(converter->_buffer, separator); + } + TRI_ConvertQueryJavascript(converter, next); + next = next->_next; + } +} + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialize the to-Javascript conversion context +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_javascript_converter_t* TRI_InitQueryJavascript (void) { + TRI_string_buffer_t* buffer; + TRI_query_javascript_converter_t* converter; + + converter = (TRI_query_javascript_converter_t*) + TRI_Allocate(sizeof(TRI_query_javascript_converter_t)); + if (!converter) { + return NULL; + } + + // init + converter->_buffer = NULL; + converter->_prefix = NULL; + + buffer = (TRI_string_buffer_t*) TRI_Allocate(sizeof(TRI_string_buffer_t)); + if (!buffer) { + TRI_Free(converter); + return NULL; + } + + TRI_InitStringBuffer(buffer); + converter->_buffer = buffer; + + return converter; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free the to-Javascript conversion text +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FreeQueryJavascript (TRI_query_javascript_converter_t* converter) { + TRI_FreeStringBuffer(converter->_buffer); + TRI_Free(converter->_buffer); + TRI_Free(converter); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create a javascript string by recursively walking an expression AST +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ConvertQueryJavascript (TRI_query_javascript_converter_t* converter, + const TRI_query_node_t* const node) { + TRI_query_node_t* lhs; + TRI_query_node_t* rhs; + char* escapedString; + size_t outLength; + + if (!node) { + return; + } + + lhs = node->_lhs; + rhs = node->_rhs; + + switch (node->_type) { + case TRI_QueryNodeValueUndefined: + TRI_AppendStringStringBuffer(converter->_buffer, "undefined"); + return; + case TRI_QueryNodeValueNull: + TRI_AppendStringStringBuffer(converter->_buffer, "null"); + return; + case TRI_QueryNodeValueBool: + TRI_AppendStringStringBuffer(converter->_buffer, + node->_value._boolValue ? "true" : "false"); + return; + case TRI_QueryNodeValueString: + TRI_AppendCharStringBuffer(converter->_buffer, '"'); + escapedString = TRI_EscapeUtf8String(node->_value._stringValue, + strlen(node->_value._stringValue), + false, + &outLength); + if (escapedString) { + TRI_AppendStringStringBuffer(converter->_buffer, escapedString); + TRI_Free(escapedString); + } + TRI_AppendCharStringBuffer(converter->_buffer, '"'); + return; + case TRI_QueryNodeValueNumberInt: + TRI_AppendInt64StringBuffer(converter->_buffer, node->_value._intValue); + return; + case TRI_QueryNodeValueNumberDouble: + TRI_AppendDoubleStringBuffer(converter->_buffer, node->_value._doubleValue); + return; + case TRI_QueryNodeValueNumberDoubleString: + TRI_AppendStringStringBuffer(converter->_buffer, node->_value._stringValue); + return; + case TRI_QueryNodeValueArray: + TRI_AppendCharStringBuffer(converter->_buffer, '['); + TRI_WalkListQueryJavascript(converter, rhs, ',', 0); + TRI_AppendCharStringBuffer(converter->_buffer, ']'); + return; + case TRI_QueryNodeValueDocument: + TRI_AppendCharStringBuffer(converter->_buffer, '{'); + TRI_WalkListQueryJavascript(converter, rhs, ',', 0); + TRI_AppendCharStringBuffer(converter->_buffer, '}'); + return; + case TRI_QueryNodeValueParameterNumeric: + case TRI_QueryNodeValueParameterNamed: + // TODO: + return; + case TRI_QueryNodeValueIdentifier: + TRI_AppendStringStringBuffer(converter->_buffer, + node->_value._stringValue); + return; + case TRI_QueryNodeValueNamedValue: + TRI_ConvertQueryJavascript(converter, lhs); + TRI_AppendCharStringBuffer(converter->_buffer, ':'); + TRI_ConvertQueryJavascript(converter, rhs); + return; + case TRI_QueryNodeReferenceCollectionAlias: + if (!converter->_prefix) { + TRI_AppendStringStringBuffer(converter->_buffer, "$['"); + TRI_AppendStringStringBuffer(converter->_buffer, + node->_value._stringValue); + TRI_AppendStringStringBuffer(converter->_buffer, "']"); + } + else { + TRI_AppendStringStringBuffer(converter->_buffer, "$['"); + TRI_AppendStringStringBuffer(converter->_buffer, + converter->_prefix); + TRI_AppendStringStringBuffer(converter->_buffer, "']."); + TRI_AppendStringStringBuffer(converter->_buffer, + node->_value._stringValue); + } + return; + case TRI_QueryNodeUnaryOperatorPlus: + case TRI_QueryNodeUnaryOperatorMinus: + case TRI_QueryNodeUnaryOperatorNot: + TRI_AppendStringStringBuffer(converter->_buffer, + TRI_QueryNodeGetUnaryOperatorString(node->_type)); + TRI_ConvertQueryJavascript(converter, lhs); + return; + case TRI_QueryNodeBinaryOperatorAnd: + case TRI_QueryNodeBinaryOperatorOr: + case TRI_QueryNodeBinaryOperatorIdentical: + case TRI_QueryNodeBinaryOperatorUnidentical: + case TRI_QueryNodeBinaryOperatorEqual: + case TRI_QueryNodeBinaryOperatorUnequal: + case TRI_QueryNodeBinaryOperatorLess: + case TRI_QueryNodeBinaryOperatorGreater: + case TRI_QueryNodeBinaryOperatorLessEqual: + case TRI_QueryNodeBinaryOperatorGreaterEqual: + case TRI_QueryNodeBinaryOperatorAdd: + case TRI_QueryNodeBinaryOperatorSubtract: + case TRI_QueryNodeBinaryOperatorMultiply: + case TRI_QueryNodeBinaryOperatorDivide: + case TRI_QueryNodeBinaryOperatorModulus: + case TRI_QueryNodeBinaryOperatorIn: + TRI_AppendCharStringBuffer(converter->_buffer, '('); + TRI_ConvertQueryJavascript(converter, lhs); + TRI_AppendStringStringBuffer(converter->_buffer, + TRI_QueryNodeGetBinaryOperatorString(node->_type)); + TRI_ConvertQueryJavascript(converter, rhs); + TRI_AppendCharStringBuffer(converter->_buffer, ')'); + return; + case TRI_QueryNodeContainerMemberAccess: + TRI_ConvertQueryJavascript(converter, lhs); + TRI_WalkListQueryJavascript(converter, rhs, '.', 1); + return; + case TRI_QueryNodeContainerTernarySwitch: + TRI_ConvertQueryJavascript(converter, lhs); + TRI_AppendCharStringBuffer(converter->_buffer, ':'); + TRI_ConvertQueryJavascript(converter, rhs); + return; + case TRI_QueryNodeControlFunctionCall: + TRI_ConvertQueryJavascript(converter, lhs); + TRI_AppendCharStringBuffer(converter->_buffer, '('); + TRI_WalkListQueryJavascript(converter, rhs, ',', 0); + TRI_AppendCharStringBuffer(converter->_buffer, ')'); + return; + case TRI_QueryNodeControlTernary: + TRI_AppendCharStringBuffer(converter->_buffer, '('); + TRI_ConvertQueryJavascript(converter, lhs); + TRI_AppendCharStringBuffer(converter->_buffer, '?'); + TRI_ConvertQueryJavascript(converter, rhs); + TRI_AppendCharStringBuffer(converter->_buffer, ')'); + return; + default: + return; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create a javascript string by recursively walking an order by AST +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ConvertOrderQueryJavascript (TRI_query_javascript_converter_t* converter, + const TRI_query_node_t* const node) { + TRI_query_node_t* lhs; + TRI_query_node_t* rhs; + TRI_query_node_t* current; + + if (!node) { + return; + } + + current = (TRI_query_node_t*) node; + while (current) { + lhs = current->_lhs; + TRI_AppendStringStringBuffer(converter->_buffer, "lhs="); + converter->_prefix = "l"; + TRI_ConvertQueryJavascript(converter, lhs); + TRI_AppendStringStringBuffer(converter->_buffer, ";rhs="); + converter->_prefix = "r"; + TRI_ConvertQueryJavascript(converter, lhs); + + rhs = current->_rhs; + if (rhs->_value._boolValue) { + TRI_AppendStringStringBuffer(converter->_buffer, ";if(lhsrhs)return 1;"); + } + else { + TRI_AppendStringStringBuffer(converter->_buffer, ";if(lhsrhs)return -1;"); + } + if (!current->_next) { + break; + } + current = current->_next; + } + TRI_AppendStringStringBuffer(converter->_buffer, "return 0;"); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: + diff --git a/QL/javascripter.h b/VocBase/query-javascript.h similarity index 75% rename from QL/javascripter.h rename to VocBase/query-javascript.h index 31607e6d4d..3ec5a738c5 100644 --- a/QL/javascripter.h +++ b/VocBase/query-javascript.h @@ -25,72 +25,58 @@ /// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_DURHAM_QL_JAVASCRIPTER -#define TRIAGENS_DURHAM_QL_JAVASCRIPTER +#ifndef TRIAGENS_DURHAM_VOC_BASE_QUERY_JAVASCRIPT_H +#define TRIAGENS_DURHAM_VOC_BASE_QUERY_JAVASCRIPT_H 1 #include #include -#include "QL/ast-node.h" - +#include "VocBase/query-node.h" #ifdef __cplusplus extern "C" { #endif - //////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL +/// @addtogroup VocBase /// @{ //////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////// /// @brief to-Javascript conversion context //////////////////////////////////////////////////////////////////////////////// -typedef struct QL_javascript_conversion_s { - TRI_string_buffer_t *_buffer; - char *_prefix; +typedef struct QL_query_javascript_converter_s { + TRI_string_buffer_t* _buffer; + char* _prefix; } -QL_javascript_conversion_t; - +TRI_query_javascript_converter_t; //////////////////////////////////////////////////////////////////////////////// /// @brief initialize the to-Javascript conversion context //////////////////////////////////////////////////////////////////////////////// -QL_javascript_conversion_t * QLJavascripterInit (void); - +TRI_query_javascript_converter_t* TRI_InitQueryJavascript (void); //////////////////////////////////////////////////////////////////////////////// /// @brief free the to-Javascript conversion text //////////////////////////////////////////////////////////////////////////////// -void QLJavascripterFree (QL_javascript_conversion_t *); - - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Walk a horizontal list of elements and print them -//////////////////////////////////////////////////////////////////////////////// - -void QLJavascripterWalkList (QL_javascript_conversion_t *, - QL_ast_node_t *, const char, size_t); - +void TRI_FreeQueryJavascript (TRI_query_javascript_converter_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief create a javascript string by recursively walking an expression AST //////////////////////////////////////////////////////////////////////////////// -void QLJavascripterConvert (QL_javascript_conversion_t *, QL_ast_node_t *); - +void TRI_ConvertQueryJavascript (TRI_query_javascript_converter_t*, + const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief create a javascript string by recursively walking an order by AST //////////////////////////////////////////////////////////////////////////////// -void QLJavascripterConvertOrder (QL_javascript_conversion_t *, QL_ast_node_t *); - +void TRI_ConvertOrderQueryJavascript (TRI_query_javascript_converter_t*, + const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/VocBase/query-node.c b/VocBase/query-node.c new file mode 100644 index 0000000000..8e9928eb9a --- /dev/null +++ b/VocBase/query-node.c @@ -0,0 +1,469 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief AST node declarations +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "VocBase/query-node.h" + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup QL +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get text/label for a node based on its type +//////////////////////////////////////////////////////////////////////////////// + +const char* TRI_QueryNodeGetName (const TRI_query_node_type_e type) { + switch (type) { + case TRI_QueryNodeContainerList: + return "list container"; + case TRI_QueryNodeContainerOrderElement: + return "order element container"; + case TRI_QueryNodeContainerMemberAccess: + return "member access"; + case TRI_QueryNodeContainerTernarySwitch: + return "ternary operator switch"; + case TRI_QueryNodeContainerCoordinatePair: + return "coordinate pair"; + + case TRI_QueryNodeJoinList: + return "join: list"; + case TRI_QueryNodeJoinInner: + return "join: inner"; + case TRI_QueryNodeJoinLeft: + return "join: left"; + case TRI_QueryNodeJoinRight: + return "join: right"; + + case TRI_QueryNodeValueUndefined: + return "value: undefined"; + case TRI_QueryNodeValueNull: + return "value: null"; + case TRI_QueryNodeValueBool: + return "value: bool"; + case TRI_QueryNodeValueString: + return "value: string"; + case TRI_QueryNodeValueNumberInt: + return "value: number (int)"; + case TRI_QueryNodeValueNumberDouble: + case TRI_QueryNodeValueNumberDoubleString: + return "value: number (double)"; + case TRI_QueryNodeValueArray: + return "value: array"; + case TRI_QueryNodeValueDocument: + return "value: document"; + case TRI_QueryNodeValueParameterNumeric: + return "value: numeric parameter"; + case TRI_QueryNodeValueParameterNamed: + return "value: named parameter"; + case TRI_QueryNodeValueIdentifier: + return "value: identifier"; + case TRI_QueryNodeValueNamedValue: + return "value: named value"; + case TRI_QueryNodeValueCoordinate: + return "value: geo coordinate"; + case TRI_QueryNodeValueOrderDirection: + return "value: orderdirection"; + + case TRI_QueryNodeReferenceCollection: + return "reference: collection"; + case TRI_QueryNodeReferenceCollectionAlias: + return "reference: collection alias"; + + case TRI_QueryNodeRestrictWithin: + return "within restrictor"; + case TRI_QueryNodeRestrictNear: + return "near restrictor"; + + case TRI_QueryNodeUnaryOperatorPlus: + return "unary: plus"; + case TRI_QueryNodeUnaryOperatorMinus: + return "unary: minus"; + case TRI_QueryNodeUnaryOperatorNot: + return "unary: not"; + + case TRI_QueryNodeBinaryOperatorIn: + return "binary: in"; + case TRI_QueryNodeBinaryOperatorAnd: + return "binary: and"; + case TRI_QueryNodeBinaryOperatorOr: + return "binary: or"; + case TRI_QueryNodeBinaryOperatorIdentical: + return "binary: identical"; + case TRI_QueryNodeBinaryOperatorUnidentical: + return "binary: unidentical"; + case TRI_QueryNodeBinaryOperatorEqual: + return "binary: equal"; + case TRI_QueryNodeBinaryOperatorUnequal: + return "binary: unequal"; + case TRI_QueryNodeBinaryOperatorLess: + return "binary: less"; + case TRI_QueryNodeBinaryOperatorGreater: + return "binary: greater"; + case TRI_QueryNodeBinaryOperatorLessEqual: + return "binary: lessequal"; + case TRI_QueryNodeBinaryOperatorGreaterEqual: + return "binary: greaterequal"; + case TRI_QueryNodeBinaryOperatorAdd: + return "binary: add"; + case TRI_QueryNodeBinaryOperatorSubtract: + return "binary: subtract"; + case TRI_QueryNodeBinaryOperatorMultiply: + return "binary: multiply"; + case TRI_QueryNodeBinaryOperatorDivide: + return "binary: divide"; + case TRI_QueryNodeBinaryOperatorModulus: + return "binary: modulus"; + + case TRI_QueryNodeControlFunctionCall: + return "function call"; + case TRI_QueryNodeControlTernary: + return "ternary operator"; + + default: + return "unknown"; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the type group of a node based on its type +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_node_type_group_e TRI_QueryNodeGetTypeGroup (const TRI_query_node_type_e type) { + switch (type) { + case TRI_QueryNodeContainerList: + case TRI_QueryNodeContainerOrderElement: + case TRI_QueryNodeContainerMemberAccess: + case TRI_QueryNodeContainerTernarySwitch: + case TRI_QueryNodeContainerCoordinatePair: + return TRI_QueryNodeGroupContainer; + + case TRI_QueryNodeJoinList: + case TRI_QueryNodeJoinInner: + case TRI_QueryNodeJoinLeft: + case TRI_QueryNodeJoinRight: + return TRI_QueryNodeGroupJoin; + + case TRI_QueryNodeValueUndefined: + case TRI_QueryNodeValueNull: + case TRI_QueryNodeValueBool: + case TRI_QueryNodeValueString: + case TRI_QueryNodeValueNumberInt: + case TRI_QueryNodeValueNumberDouble: + case TRI_QueryNodeValueNumberDoubleString: + case TRI_QueryNodeValueArray: + case TRI_QueryNodeValueDocument: + case TRI_QueryNodeValueParameterNumeric: + case TRI_QueryNodeValueParameterNamed: + case TRI_QueryNodeValueIdentifier: + case TRI_QueryNodeValueNamedValue: + case TRI_QueryNodeValueCoordinate: + case TRI_QueryNodeValueOrderDirection: + return TRI_QueryNodeGroupValue; + + case TRI_QueryNodeReferenceCollection: + case TRI_QueryNodeReferenceCollectionAlias: + return TRI_QueryNodeGroupReference; + + case TRI_QueryNodeRestrictWithin: + case TRI_QueryNodeRestrictNear: + return TRI_QueryNodeGroupRestrict; + + case TRI_QueryNodeUnaryOperatorPlus: + case TRI_QueryNodeUnaryOperatorMinus: + case TRI_QueryNodeUnaryOperatorNot: + return TRI_QueryNodeGroupUnaryOperator; + + case TRI_QueryNodeBinaryOperatorIn: + case TRI_QueryNodeBinaryOperatorAnd: + case TRI_QueryNodeBinaryOperatorOr: + case TRI_QueryNodeBinaryOperatorIdentical: + case TRI_QueryNodeBinaryOperatorUnidentical: + case TRI_QueryNodeBinaryOperatorEqual: + case TRI_QueryNodeBinaryOperatorUnequal: + case TRI_QueryNodeBinaryOperatorLess: + case TRI_QueryNodeBinaryOperatorGreater: + case TRI_QueryNodeBinaryOperatorLessEqual: + case TRI_QueryNodeBinaryOperatorGreaterEqual: + case TRI_QueryNodeBinaryOperatorAdd: + case TRI_QueryNodeBinaryOperatorSubtract: + case TRI_QueryNodeBinaryOperatorMultiply: + case TRI_QueryNodeBinaryOperatorDivide: + case TRI_QueryNodeBinaryOperatorModulus: + return TRI_QueryNodeGroupBinaryOperator; + + case TRI_QueryNodeControlFunctionCall: + case TRI_QueryNodeControlTernary: + return TRI_QueryNodeGroupControl; + + default: + return TRI_QueryNodeGroupUndefined; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the reverse of a relational operator +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_node_type_e TRI_QueryNodeGetReversedRelationalOperator (const TRI_query_node_type_e type) { + if (type == TRI_QueryNodeBinaryOperatorIdentical || + type == TRI_QueryNodeBinaryOperatorEqual || + type == TRI_QueryNodeBinaryOperatorUnidentical || + type == TRI_QueryNodeBinaryOperatorUnequal) { + return type; + } + if (type == TRI_QueryNodeBinaryOperatorLess) { + return TRI_QueryNodeBinaryOperatorGreaterEqual; + } + if (type == TRI_QueryNodeBinaryOperatorLessEqual) { + return TRI_QueryNodeBinaryOperatorGreater; + } + if (type == TRI_QueryNodeBinaryOperatorGreater) { + return TRI_QueryNodeBinaryOperatorLessEqual; + } + if (type == TRI_QueryNodeBinaryOperatorGreaterEqual) { + return TRI_QueryNodeBinaryOperatorLess; + } + assert(false); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the label string for a unary operator +//////////////////////////////////////////////////////////////////////////////// + +char* TRI_QueryNodeGetUnaryOperatorString (const TRI_query_node_type_e type) { + switch (type) { + case TRI_QueryNodeUnaryOperatorPlus: + return "+"; + case TRI_QueryNodeUnaryOperatorMinus: + return "-"; + case TRI_QueryNodeUnaryOperatorNot: + return "!"; + default: + return ""; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the label string for a binary operator +//////////////////////////////////////////////////////////////////////////////// + +char* TRI_QueryNodeGetBinaryOperatorString (const TRI_query_node_type_e type) { + switch (type) { + case TRI_QueryNodeBinaryOperatorAnd: + return "&&"; + case TRI_QueryNodeBinaryOperatorOr: + return "||"; + case TRI_QueryNodeBinaryOperatorIdentical: + return "==="; + case TRI_QueryNodeBinaryOperatorUnidentical: + return "!=="; + case TRI_QueryNodeBinaryOperatorEqual: + return "=="; + case TRI_QueryNodeBinaryOperatorUnequal: + return "!="; + case TRI_QueryNodeBinaryOperatorLess: + return "<"; + case TRI_QueryNodeBinaryOperatorGreater: + return ">"; + case TRI_QueryNodeBinaryOperatorLessEqual: + return "<="; + case TRI_QueryNodeBinaryOperatorGreaterEqual: + return ">="; + case TRI_QueryNodeBinaryOperatorAdd: + return "+"; + case TRI_QueryNodeBinaryOperatorSubtract: + return "-"; + case TRI_QueryNodeBinaryOperatorMultiply: + return "*"; + case TRI_QueryNodeBinaryOperatorDivide: + return "/"; + case TRI_QueryNodeBinaryOperatorModulus: + return "%"; + case TRI_QueryNodeBinaryOperatorIn: + return " in "; + default: + return ""; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is a value node +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsValueNode (const TRI_query_node_t* const node) { + switch (node->_type) { + case TRI_QueryNodeValueUndefined: + case TRI_QueryNodeValueNull: + case TRI_QueryNodeValueBool: + case TRI_QueryNodeValueString: + case TRI_QueryNodeValueNumberInt: + case TRI_QueryNodeValueNumberDouble: + case TRI_QueryNodeValueNumberDoubleString: + case TRI_QueryNodeValueArray: + case TRI_QueryNodeValueDocument: + case TRI_QueryNodeValueParameterNumeric: + case TRI_QueryNodeValueParameterNamed: + case TRI_QueryNodeValueIdentifier: + case TRI_QueryNodeValueNamedValue: + case TRI_QueryNodeValueOrderDirection: + return true; + default: + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is a logical operator +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsArithmeticOperator (const TRI_query_node_t* const node) { + switch (node->_type) { + case TRI_QueryNodeBinaryOperatorAdd: + case TRI_QueryNodeBinaryOperatorSubtract: + case TRI_QueryNodeBinaryOperatorMultiply: + case TRI_QueryNodeBinaryOperatorDivide: + case TRI_QueryNodeBinaryOperatorModulus: + return true; + default: + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is a unary operator +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsUnaryOperator (const TRI_query_node_t* const node) { + switch (node->_type) { + case TRI_QueryNodeUnaryOperatorPlus: + case TRI_QueryNodeUnaryOperatorMinus: + case TRI_QueryNodeUnaryOperatorNot: + return true; + default: + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is a binary operator +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsBinaryOperator (const TRI_query_node_t* const node) { + switch (node->_type) { + case TRI_QueryNodeBinaryOperatorIn: + case TRI_QueryNodeBinaryOperatorAnd: + case TRI_QueryNodeBinaryOperatorOr: + case TRI_QueryNodeBinaryOperatorIdentical: + case TRI_QueryNodeBinaryOperatorUnidentical: + case TRI_QueryNodeBinaryOperatorEqual: + case TRI_QueryNodeBinaryOperatorUnequal: + case TRI_QueryNodeBinaryOperatorLess: + case TRI_QueryNodeBinaryOperatorGreater: + case TRI_QueryNodeBinaryOperatorLessEqual: + case TRI_QueryNodeBinaryOperatorGreaterEqual: + case TRI_QueryNodeBinaryOperatorAdd: + case TRI_QueryNodeBinaryOperatorSubtract: + case TRI_QueryNodeBinaryOperatorMultiply: + case TRI_QueryNodeBinaryOperatorDivide: + case TRI_QueryNodeBinaryOperatorModulus: + return true; + default: + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is the ternary operator +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsTernaryOperator (const TRI_query_node_t* const node) { + return (node->_type == TRI_QueryNodeControlTernary); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is a logical operator +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsLogicalOperator (const TRI_query_node_t* const node) { + switch (node->_type) { + case TRI_QueryNodeBinaryOperatorAnd: + case TRI_QueryNodeBinaryOperatorOr: + case TRI_QueryNodeUnaryOperatorNot: + return true; + default: + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is a relational operator +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsRelationalOperator (const TRI_query_node_t* const node) { + switch (node->_type) { + case TRI_QueryNodeBinaryOperatorIdentical: + case TRI_QueryNodeBinaryOperatorUnidentical: + case TRI_QueryNodeBinaryOperatorEqual: + case TRI_QueryNodeBinaryOperatorUnequal: + case TRI_QueryNodeBinaryOperatorLess: + case TRI_QueryNodeBinaryOperatorGreater: + case TRI_QueryNodeBinaryOperatorLessEqual: + case TRI_QueryNodeBinaryOperatorGreaterEqual: + return true; + default: + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief return whether a node is a constant +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_QueryNodeIsBooleanizable (const TRI_query_node_t* const node) { + switch (node->_type) { + case TRI_QueryNodeValueBool: + // case TRI_QueryNodeValueString: // TODO + case TRI_QueryNodeValueNumberInt: + case TRI_QueryNodeValueNumberDouble: + case TRI_QueryNodeValueNumberDoubleString: + case TRI_QueryNodeValueNull: + // case TRI_QueryNodeValueArray: // TODO + return true; + default: + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: + diff --git a/QL/ast-node.h b/VocBase/query-node.h similarity index 59% rename from QL/ast-node.h rename to VocBase/query-node.h index 9318b219ac..0cee30c7fb 100644 --- a/QL/ast-node.h +++ b/VocBase/query-node.h @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief AST node declarations +/// @brief query node declarations /// /// @file /// @@ -25,19 +25,18 @@ /// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_DURHAM_QL_ASTNODE -#define TRIAGENS_DURHAM_QL_ASTNODE +#ifndef TRIAGENS_DURHAM_VOC_BASE_QUERY_NODE_H +#define TRIAGENS_DURHAM_VOC_BASE_QUERY_NODE_H 1 #include #include - #ifdef __cplusplus extern "C" { #endif //////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL +/// @addtogroup VocBase /// @{ //////////////////////////////////////////////////////////////////////////////// @@ -48,63 +47,68 @@ extern "C" { //////////////////////////////////////////////////////////////////////////////// typedef enum { - QLNodeUndefined = 0, + TRI_QueryNodeUndefined = 0, - QLNodeContainerList, - QLNodeContainerOrderElement, - QLNodeContainerMemberAccess, - QLNodeContainerTernarySwitch, + TRI_QueryNodeContainerList, + TRI_QueryNodeContainerOrderElement, + TRI_QueryNodeContainerMemberAccess, + TRI_QueryNodeContainerTernarySwitch, + TRI_QueryNodeContainerCoordinatePair, - QLNodeJoinList, - QLNodeJoinInner, - QLNodeJoinLeft, - QLNodeJoinRight, + TRI_QueryNodeJoinList, + TRI_QueryNodeJoinInner, + TRI_QueryNodeJoinLeft, + TRI_QueryNodeJoinRight, - QLNodeValueUndefined, - QLNodeValueNull, - QLNodeValueBool, - QLNodeValueString, - QLNodeValueNumberInt, - QLNodeValueNumberDouble, - QLNodeValueNumberDoubleString, - QLNodeValueArray, - QLNodeValueDocument, - QLNodeValueParameterNumeric, - QLNodeValueParameterNamed, - QLNodeValueIdentifier, - QLNodeValueNamedValue, - QLNodeValueOrderDirection, + TRI_QueryNodeValueUndefined, + TRI_QueryNodeValueNull, + TRI_QueryNodeValueBool, + TRI_QueryNodeValueString, + TRI_QueryNodeValueNumberInt, + TRI_QueryNodeValueNumberDouble, + TRI_QueryNodeValueNumberDoubleString, + TRI_QueryNodeValueArray, + TRI_QueryNodeValueDocument, + TRI_QueryNodeValueParameterNumeric, + TRI_QueryNodeValueParameterNamed, + TRI_QueryNodeValueIdentifier, + TRI_QueryNodeValueNamedValue, + TRI_QueryNodeValueCoordinate, + TRI_QueryNodeValueOrderDirection, - QLNodeReferenceCollection, - QLNodeReferenceCollectionAlias, + TRI_QueryNodeReferenceCollection, + TRI_QueryNodeReferenceCollectionAlias, - QLNodeUnaryOperatorPlus, - QLNodeUnaryOperatorMinus, - QLNodeUnaryOperatorNot, + TRI_QueryNodeRestrictWithin, + TRI_QueryNodeRestrictNear, - QLNodeBinaryOperatorIn, - QLNodeBinaryOperatorAnd, - QLNodeBinaryOperatorOr, - QLNodeBinaryOperatorIdentical, - QLNodeBinaryOperatorUnidentical, - QLNodeBinaryOperatorEqual, - QLNodeBinaryOperatorUnequal, - QLNodeBinaryOperatorLess, - QLNodeBinaryOperatorGreater, - QLNodeBinaryOperatorLessEqual, - QLNodeBinaryOperatorGreaterEqual, - QLNodeBinaryOperatorAdd, - QLNodeBinaryOperatorSubtract, - QLNodeBinaryOperatorMultiply, - QLNodeBinaryOperatorDivide, - QLNodeBinaryOperatorModulus, + TRI_QueryNodeUnaryOperatorPlus, + TRI_QueryNodeUnaryOperatorMinus, + TRI_QueryNodeUnaryOperatorNot, - QLNodeControlFunctionCall, - QLNodeControlTernary, + TRI_QueryNodeBinaryOperatorIn, + TRI_QueryNodeBinaryOperatorAnd, + TRI_QueryNodeBinaryOperatorOr, + TRI_QueryNodeBinaryOperatorIdentical, + TRI_QueryNodeBinaryOperatorUnidentical, + TRI_QueryNodeBinaryOperatorEqual, + TRI_QueryNodeBinaryOperatorUnequal, + TRI_QueryNodeBinaryOperatorLess, + TRI_QueryNodeBinaryOperatorGreater, + TRI_QueryNodeBinaryOperatorLessEqual, + TRI_QueryNodeBinaryOperatorGreaterEqual, + TRI_QueryNodeBinaryOperatorAdd, + TRI_QueryNodeBinaryOperatorSubtract, + TRI_QueryNodeBinaryOperatorMultiply, + TRI_QueryNodeBinaryOperatorDivide, + TRI_QueryNodeBinaryOperatorModulus, - QLNodeLast + TRI_QueryNodeControlFunctionCall, + TRI_QueryNodeControlTernary, + + TRI_QueryNodeLast } -QL_ast_node_type_e; +TRI_query_node_type_e; //////////////////////////////////////////////////////////////////////////////// /// @brief AST node type groups enumeration @@ -113,17 +117,18 @@ QL_ast_node_type_e; //////////////////////////////////////////////////////////////////////////////// typedef enum { - QLNodeGroupUndefined = 0, + TRI_QueryNodeGroupUndefined = 0, - QLNodeGroupContainer, - QLNodeGroupJoin, - QLNodeGroupValue, - QLNodeGroupReference, - QLNodeGroupBinaryOperator, - QLNodeGroupUnaryOperator, - QLNodeGroupControl + TRI_QueryNodeGroupContainer, + TRI_QueryNodeGroupJoin, + TRI_QueryNodeGroupValue, + TRI_QueryNodeGroupReference, + TRI_QueryNodeGroupRestrict, + TRI_QueryNodeGroupBinaryOperator, + TRI_QueryNodeGroupUnaryOperator, + TRI_QueryNodeGroupControl } -QL_ast_node_type_group_e; +TRI_query_node_type_group_e; //////////////////////////////////////////////////////////////////////////////// /// @brief AST node structure @@ -141,93 +146,97 @@ QL_ast_node_type_group_e; /// used to represent arrays and objects. //////////////////////////////////////////////////////////////////////////////// -typedef struct QL_ast_node_s { - QL_ast_node_type_e _type; +typedef struct TRI_query_node_s { + TRI_query_node_type_e _type; union { - bool _boolValue; - int64_t _intValue; - double _doubleValue; - char *_stringValue; + bool _boolValue; + int64_t _intValue; + double _doubleValue; + char* _stringValue; } _value; - int32_t _line; - int32_t _column; - void *_lhs; // pointer to left child (might be null) - void *_rhs; // pointer to right child (might be null) - void *_next; // pointer to next node (used for lists, might be null) + struct TRI_query_node_s* _lhs; // pointer to left child (might be null) + struct TRI_query_node_s* _rhs; // pointer to right child (might be null) + struct TRI_query_node_s* _next; // pointer to next node (used for lists, might be null) } -QL_ast_node_t; +TRI_query_node_t; //////////////////////////////////////////////////////////////////////////////// /// @brief get text/label for a node based on its type //////////////////////////////////////////////////////////////////////////////// -const char* QLAstNodeGetName (const QL_ast_node_type_e); +const char* TRI_QueryNodeGetName (const TRI_query_node_type_e); //////////////////////////////////////////////////////////////////////////////// /// @brief get the type group of a node based on its type //////////////////////////////////////////////////////////////////////////////// -QL_ast_node_type_group_e QLAstNodeGetTypeGroup (const QL_ast_node_type_e); +TRI_query_node_type_group_e TRI_QueryNodeGetTypeGroup (const TRI_query_node_type_e); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief get the reverse of a relational operator +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_node_type_e TRI_QueryNodeGetReversedRelationalOperator (const TRI_query_node_type_e); //////////////////////////////////////////////////////////////////////////////// /// @brief get the label string for a unary operator //////////////////////////////////////////////////////////////////////////////// -char* QLAstNodeGetUnaryOperatorString (const QL_ast_node_type_e); +char* TRI_QueryNodeGetUnaryOperatorString (const TRI_query_node_type_e); //////////////////////////////////////////////////////////////////////////////// /// @brief get the label string for a binary operator //////////////////////////////////////////////////////////////////////////////// -char* QLAstNodeGetBinaryOperatorString (const QL_ast_node_type_e); +char* TRI_QueryNodeGetBinaryOperatorString (const TRI_query_node_type_e); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is a unary operator //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsUnaryOperator (const QL_ast_node_t*); +bool TRI_QueryNodeIsUnaryOperator (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is a value node //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsValueNode (const QL_ast_node_t*); +bool TRI_QueryNodeIsValueNode (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is a binary operator //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsBinaryOperator (const QL_ast_node_t*); +bool TRI_QueryNodeIsBinaryOperator (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is the ternary operator //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsTernaryOperator (const QL_ast_node_t*); +bool TRI_QueryNodeIsTernaryOperator (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is a logical operator //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsLogicalOperator (const QL_ast_node_t*); +bool TRI_QueryNodeIsLogicalOperator (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is an arithmetic operator //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsArithmeticOperator (const QL_ast_node_t*); +bool TRI_QueryNodeIsArithmeticOperator (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is a relational operator //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsRelationalOperator (const QL_ast_node_t*); +bool TRI_QueryNodeIsRelationalOperator (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief return whether a node is convertable into a bool value //////////////////////////////////////////////////////////////////////////////// -bool QLAstNodeIsBooleanizable (const QL_ast_node_t*); +bool TRI_QueryNodeIsBooleanizable (const TRI_query_node_t* const); //////////////////////////////////////////////////////////////////////////////// /// @} @@ -243,4 +252,3 @@ bool QLAstNodeIsBooleanizable (const QL_ast_node_t*); // mode: outline-minor // outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" // End: - diff --git a/VocBase/query-parse.c b/VocBase/query-parse.c new file mode 100644 index 0000000000..23402be961 --- /dev/null +++ b/VocBase/query-parse.c @@ -0,0 +1,491 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief query parsing +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "VocBase/query-parse.h" + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Validate the structs contained in a query template +//////////////////////////////////////////////////////////////////////////////// + +static bool ValidateQueryTemplate (TRI_query_template_t* const template_) { + size_t order = 0; + + if (!TRI_ParseQueryValidateCollections(template_, + template_->_query->_select._base, + &QLAstQueryIsValidAlias, + &order)) { + // select expression invalid + return false; + } + + if (!TRI_ParseQueryValidateCollections(template_, + template_->_query->_where._base, + &QLAstQueryIsValidAlias, + &order)) { + // where expression invalid + return false; + } + + if (!TRI_ParseQueryValidateCollections(template_, + template_->_query->_order._base, + &QLAstQueryIsValidAlias, + &order)) { + // order expression invalid + return false; + } + + order = 0; + if (!TRI_ParseQueryValidateCollections(template_, + template_->_query->_from._base, + &QLAstQueryIsValidAliasOrdered, + &order)) { + // from expression(s) invalid + return false; + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Optimize the structs contained in a query template +//////////////////////////////////////////////////////////////////////////////// + +static bool OptimizeQueryTemplate (TRI_query_template_t* const template_) { + char *primaryAlias = QLAstQueryGetPrimaryAlias(template_->_query); + + // optimize select clause + QLOptimizeExpression(template_->_query->_select._base); + template_->_query->_select._type = QLOptimizeGetSelectType(template_->_query->_select._base, + primaryAlias); + + // optimize where clause + QLOptimizeExpression(template_->_query->_where._base); + template_->_query->_where._type = QLOptimizeGetWhereType(template_->_query->_where._base); + + // optimize order clause + if (template_->_query->_order._base) { + QLOptimizeOrder(template_->_query->_order._base); + template_->_query->_order._type = QLOptimizeGetOrderType(template_->_query->_order._base); + } + else { + template_->_query->_order._type = QLQueryOrderTypeNone; + } + + // optimize joins/on clauses + QLOptimizeFrom(template_); + + return true; +} + +// ----------------------------------------------------------------------------- +// --SECTION-- parser +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Create parser for the query +//////////////////////////////////////////////////////////////////////////////// + +static TRI_query_parser_t* InitParserQueryTemplate (TRI_query_template_t* const template_) { + TRI_query_parser_t* parser; + + parser = (TRI_query_parser_t*) TRI_Allocate(sizeof(TRI_query_parser_t)); + if (!parser) { + return NULL; + } + + // init query data + parser->_length = strlen(template_->_queryString); + parser->_buffer = (char*) template_->_queryString; + + // init lexer/scanner + QLlex_init(&parser->_scanner); + QLset_extra(template_, parser->_scanner); + + return parser; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Free the parser for the query +//////////////////////////////////////////////////////////////////////////////// + +static void FreeParserQueryTemplate (TRI_query_template_t* const template_) { + assert(template_); + assert(template_->_parser); + + // free lexer/scanner + QLlex_destroy(template_->_parser->_scanner); + + TRI_Free(template_->_parser); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Parse the query contained in a query template +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ParseQueryTemplate (TRI_query_template_t* const template_) { + assert(template_); + assert(template_->_queryString); + assert(template_->_query); + + template_->_parser = InitParserQueryTemplate(template_); + if (!template_->_parser) { + return false; + } + + if (QLparse(template_)) { + FreeParserQueryTemplate(template_); + return false; + } + + FreeParserQueryTemplate(template_); + + if (template_->_query->_type == QLQueryTypeEmpty) { + TRI_SetQueryError(&template_->_error, + TRI_ERROR_QUERY_EMPTY, + NULL); + return false; + } + + if (!ValidateQueryTemplate(template_)) { + return false; + } + + return OptimizeQueryTemplate(template_); +} + +// ----------------------------------------------------------------------------- +// --SECTION-- parser helper functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief keep track of an allocated ast node +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ParseQueryRegisterNode (TRI_query_template_t* const template_, + TRI_query_node_t* element) { + TRI_PushBackVectorPointer(&template_->_memory._nodes, element); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free an ast node +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ParseQueryFreeNode (TRI_query_node_t* element) { + if (element) { + TRI_Free(element); + element = NULL; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief copies a string and keeps track of its memory location in a vector +//////////////////////////////////////////////////////////////////////////////// + +char* TRI_ParseQueryAllocString (TRI_query_template_t* const template_, + const char* string) { + // do string duplication + char* copy = TRI_DuplicateString(string); + + // store pointer to copy + return TRI_ParseQueryRegisterString(template_, copy); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief copies a string part and keeps track of its memory location in a vector +//////////////////////////////////////////////////////////////////////////////// + +char* TRI_ParseQueryAllocString2 (TRI_query_template_t* const template_, + const char* string, + const size_t length) { + // do string part duplication + char* copy = TRI_DuplicateString2(string, length); + + // store pointer to copy and return it + return TRI_ParseQueryRegisterString(template_, copy); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief keep track of an allocated string +//////////////////////////////////////////////////////////////////////////////// + +char* TRI_ParseQueryRegisterString (TRI_query_template_t* const template_, + const char* string) { + TRI_PushBackVectorPointer(&template_->_memory._strings, (char*) string); + + return (char*) string; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief free a string +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ParseQueryFreeString (char* string) { + if (string) { + TRI_Free(string); + string = NULL; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief create a new node for the ast +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_node_t* TRI_ParseQueryCreateNode (TRI_query_template_t* const template_, + const TRI_query_node_type_e type) { + // allocate memory + TRI_query_node_t* node = (TRI_query_node_t *) TRI_Allocate(sizeof(TRI_query_node_t)); + if (!node) { + return NULL; + } + + // keep track of memory location + TRI_ParseQueryRegisterNode(template_, node); + + // set node type + node->_type = type; + + // set initial pointers to 0 + node->_value._stringValue = 0; + node->_lhs = 0; + node->_rhs = 0; + node->_next = 0; + + // set position information +// node->_line = QLget_lineno(template_->_parser->_scanner); +// node->_column = QLget_column(template_->_parser->_scanner); + + return node; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief open a new context layer for the parser +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ParseQueryContextPush (TRI_query_template_t* const template_, + TRI_query_node_t* element) { + TRI_PushBackVectorPointer(&template_->_memory._listHeads, element); + TRI_PushBackVectorPointer(&template_->_memory._listTails, element); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief close the current context layer of the parser and return it +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_node_t* TRI_ParseQueryContextPop (TRI_query_template_t* const template_) { + TRI_query_node_t* head; + size_t i; + + i = template_->_memory._listHeads._length; + + if (i > 0) { + TRI_RemoveVectorPointer(&template_->_memory._listTails, i - 1); + head = TRI_RemoveVectorPointer(&template_->_memory._listHeads, i - 1); + return head; + } + + return 0; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief add an element to the current parsing context +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ParseQueryContextAddElement (TRI_query_template_t* const template_, + TRI_query_node_t* element) { + TRI_query_node_t* last; + size_t i; + + i = template_->_memory._listTails._length; + + if (i > 0) { + last = *(template_->_memory._listTails._buffer + i -1); + if (last) { + last->_next = element; + *(template_->_memory._listTails._buffer + i -1) = element; + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief pop the current parse context from the stack into the rhs element +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ParseQueryPopIntoRhs (TRI_query_node_t* node, + TRI_query_template_t* const template_) { + TRI_query_node_t* popped; + popped = TRI_ParseQueryContextPop(template_); + + if (node) { + node->_rhs = popped; + } +} + +// ----------------------------------------------------------------------------- +// --SECTION-- validation +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Validate a collection name +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ParseQueryValidateCollectionName (const char* name) { + const char* p = name; + char c; + size_t length = 0; + + while ('\0' != (c = *p++)) { + if (length == 0) { + if (!(c >= 'A' && c <= 'Z') && + !(c >= 'a' && c <= 'z')) { + return false; + } + } + if (!(c >= 'A' && c <= 'Z') && + !(c >= 'a' && c <= 'z') && + !(c >= '0' && c <= '9')) { + return false; + } + length++; + } + + return ((length > 0) && (length <= TRI_QUERY_NAME_MAX_LENGTH)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Validate a collection alias +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ParseQueryValidateCollectionAlias (const char* name) { + const char* p = name; + char c; + size_t totalLength = 0; + size_t charLength = 0; + + c = *p; + // must start with one these chars + if (!(c >= 'A' && c <= 'Z') && + !(c >= 'a' && c <= 'z') && + !(c == '_')) { + return false; + } + + while ('\0' != (c = *p++)) { + if (!(c >= 'A' && c <= 'Z') && + !(c >= 'a' && c <= 'z') && + !(c >= '0' && c <='9') && + !(c == '_')) { + return false; + } + if (!(c >= '0' && c <='9') && + !(c == '_')) { + // must include at least one letter + charLength++; + } + totalLength++; + } + + // if no letter is contained, the alias is invalid + if (charLength == 0) { + return false; + } + + return ((totalLength > 0) && (totalLength <= TRI_QUERY_NAME_MAX_LENGTH)); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Validate the collections used in a query part +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ParseQueryValidateCollections (TRI_query_template_t* const template_, + TRI_query_node_t* node, + QL_parser_validate_func validateFunc, + size_t* order) { + TRI_query_node_t* lhs; + TRI_query_node_t* rhs; + TRI_query_node_t* next; + + if (!node) { + return true; + } + + if (node->_type == TRI_QueryNodeContainerList) { + next = node->_next; + while (next) { + if (!TRI_ParseQueryValidateCollections(template_, next, validateFunc, order)) { + return false; + } + next = next->_next; + } + } + + if (node->_type == TRI_QueryNodeReferenceCollection) { + ++(*order); + } + + if (node->_type == TRI_QueryNodeReferenceCollectionAlias) { + if (!validateFunc(template_->_query, node->_value._stringValue, *order)) { + TRI_SetQueryError(&template_->_error, + TRI_ERROR_QUERY_COLLECTION_ALIAS_UNDECLARED, + node->_value._stringValue); + return false; + } + } + + lhs = node->_lhs; + if (lhs) { + if (!TRI_ParseQueryValidateCollections(template_, lhs, validateFunc, order)) { + return false; + } + } + + rhs = node->_rhs; + if (rhs) { + if (!TRI_ParseQueryValidateCollections(template_, rhs, validateFunc, order)) { + return false; + } + } + + return true; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/QL/parser-context.h b/VocBase/query-parse.h similarity index 53% rename from QL/parser-context.h rename to VocBase/query-parse.h index bdbca973bb..c6a3b10258 100644 --- a/QL/parser-context.h +++ b/VocBase/query-parse.h @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief parser context for flex-based query scanner +/// @brief query parsing /// /// @file /// @@ -25,134 +25,56 @@ /// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_DURHAM_QL_PARSERCONTEXT -#define TRIAGENS_DURHAM_QL_PARSERCONTEXT +#ifndef TRIAGENS_DURHAM_VOC_BASE_QUERY_PARSE_H +#define TRIAGENS_DURHAM_VOC_BASE_QUERY_PARSE_H 1 -#include -#include -#include - -#include - -#include "QL/parser.h" -#include "QL/error.h" -#include "QL/ast-node.h" -#include "QL/ast-query.h" +#include "VocBase/query-base.h" +#include "VocBase/query-error.h" +#include "QL/optimize.h" #ifdef __cplusplus extern "C" { #endif //////////////////////////////////////////////////////////////////////////////// -/// @addtogroup QL +/// @addtogroup VocBase /// @{ //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @brief Parser stages +/// @brief Maximum length of an identifier in a query //////////////////////////////////////////////////////////////////////////////// -typedef enum { - STAGE_UNDEFINED = 0, +#define TRI_QUERY_NAME_MAX_LENGTH 64 - STAGE_PARSE, - STAGE_POST_PARSE -} -QL_parse_stage_e; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief lexer error state container -/// -/// This struct keeps track of parsing errors that occur during lexing and -/// parsing. -/// It contains the position (line / column) where the error occurred plus a -/// pointer to the error message as generated by bison / flex. -//////////////////////////////////////////////////////////////////////////////// - -typedef struct QL_error_state_s { - QL_error_type_e _code; - int _line; - int _column; - char *_message; -} -QL_error_state_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief lexer state -/// -/// This struct contains the current lexer / scanner state. It contains -/// positioning information (pointer into query string, remaining length) -/// because flex processes strings in chunks of 8k by default. -/// Additionally it contains any error information in case a parse error occurs. -/// -/// Each lexer instance will have its own struct instance to support reentrancy. -//////////////////////////////////////////////////////////////////////////////// - -typedef struct QL_lex_state_s { - int _length; - char *_buffer; - QL_error_state_t _errorState; -} -QL_lex_state_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief parser context -/// -/// This struct contains the complete context for processing queries. -/// It contains a lexer / scanner instance, the lexer state and some vectors -/// that contain locations of allocated memory. This is especially important -/// because in case of parse errors, bison / flex will not automatically free -/// allocated memory. This has to be done manually, and that is what the vectors -/// are used for. There is a vector for AST nodes and a vector for strings -/// (used to keep track of string literals used in the query). There are also -/// two vectors to keep track of list elements (arrays / objects) in queries. -/// -/// Each parser instance will have its own struct instance to support reentrancy. -//////////////////////////////////////////////////////////////////////////////// - -typedef struct QL_parser_context_s { - void *_scanner; - QL_parse_stage_e _stage; - QL_lex_state_t _lexState; - QL_ast_query_t *_query; - TRI_vector_pointer_t _nodes; // memory locations of allocated AST node - TRI_vector_pointer_t _strings; // memory locations of allocated strings - TRI_vector_pointer_t _listHeads; // start of lists - TRI_vector_pointer_t _listTails; // end of lists -} -QL_parser_context_t; +// ----------------------------------------------------------------------------- +// --SECTION-- forwards +// ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// /// @brief Forward declaration for parse function as generated by flex/bison //////////////////////////////////////////////////////////////////////////////// -int QLparse (QL_parser_context_t*); +int QLparse (TRI_query_template_t* const); int QLlex_destroy (void *); -void QLset_extra (QL_parser_context_t*, void*); +void QLset_extra (TRI_query_template_t* const, void*); int QLlex_init (void**); int QLget_lineno (void*); int QLget_column (void*); -//////////////////////////////////////////////////////////////////////////////// -/// @brief initializes the parser context for a query -/// -/// This function must be called before starting to parse any query. It will -/// reset the context, set the location pointers and set up memory structures -/// for later garbage collection -//////////////////////////////////////////////////////////////////////////////// - -bool QLParseInit (QL_parser_context_t*, const char*); +// ----------------------------------------------------------------------------- +// --SECTION-- parser +// ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @brief free all memory allocated in context of a query -/// -/// This function must be called when processing a query is finished. It will -/// free all memory that was allocated when parsing a query and setting up the -/// query's AST. It will also de-allocate all nodes in the AST so that they -/// cannot be used anymore after this function is called. +/// @brief Parse the query contained in a query template //////////////////////////////////////////////////////////////////////////////// -void QLParseFree (QL_parser_context_t*); +bool TRI_ParseQueryTemplate (TRI_query_template_t* const); + +// ----------------------------------------------------------------------------- +// --SECTION-- parser helper functions +// ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// /// @brief keep track of an allocated ast node @@ -160,7 +82,7 @@ void QLParseFree (QL_parser_context_t*); /// Register a created node's memory location for later garbage collection //////////////////////////////////////////////////////////////////////////////// -void QLParseRegisterNode (QL_parser_context_t*, QL_ast_node_t*); +void TRI_ParseQueryRegisterNode (TRI_query_template_t* const, TRI_query_node_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief free an ast node @@ -168,7 +90,7 @@ void QLParseRegisterNode (QL_parser_context_t*, QL_ast_node_t*); /// Free one node //////////////////////////////////////////////////////////////////////////////// -void QLParseFreeNode (QL_ast_node_t*); +void TRI_ParseQueryFreeNode (TRI_query_node_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief copies a string and keeps track of its memory location in a vector @@ -177,7 +99,7 @@ void QLParseFreeNode (QL_ast_node_t*); /// track of the strings memory location for later garbage collection. //////////////////////////////////////////////////////////////////////////////// -char* QLParseAllocString (QL_parser_context_t*, const char*); +char* TRI_ParseQueryAllocString (TRI_query_template_t* const, const char*); //////////////////////////////////////////////////////////////////////////////// /// @brief copies a string part and keeps track of its memory location in a vector @@ -186,7 +108,9 @@ char* QLParseAllocString (QL_parser_context_t*, const char*); /// track of the strings memory location for later garbage collection. //////////////////////////////////////////////////////////////////////////////// -char* QLParseAllocString2 (QL_parser_context_t*,const char*, const size_t); +char* TRI_ParseQueryAllocString2 (TRI_query_template_t* const, + const char*, + const size_t); //////////////////////////////////////////////////////////////////////////////// /// @brief keep track of an allocated string @@ -194,7 +118,7 @@ char* QLParseAllocString2 (QL_parser_context_t*,const char*, const size_t); /// Register a strings memory location for later garbage collection //////////////////////////////////////////////////////////////////////////////// -char* QLParseRegisterString (QL_parser_context_t*, const char*); +char* TRI_ParseQueryRegisterString (TRI_query_template_t* const, const char*); //////////////////////////////////////////////////////////////////////////////// /// @brief free a string @@ -202,15 +126,16 @@ char* QLParseRegisterString (QL_parser_context_t*, const char*); /// Free memory that was allocated for a string //////////////////////////////////////////////////////////////////////////////// -void QLParseFreeString (char*); +void TRI_ParseQueryFreeString (char*); //////////////////////////////////////////////////////////////////////////////// /// @brief create a new node for the ast /// -/// Create a new AST node of the given type (@ref QL_ast_node_type_e) +/// Create a new AST node of the given type (@ref TRI_query_node_type_e) //////////////////////////////////////////////////////////////////////////////// -QL_ast_node_t* QLAstNodeCreate (QL_parser_context_t*, const QL_ast_node_type_e); +TRI_query_node_t* TRI_ParseQueryCreateNode (TRI_query_template_t* const, + const TRI_query_node_type_e); //////////////////////////////////////////////////////////////////////////////// /// @brief open a new context layer for the parser @@ -219,47 +144,65 @@ QL_ast_node_t* QLAstNodeCreate (QL_parser_context_t*, const QL_ast_node_type_e); /// (arrays, objects) in the parser. //////////////////////////////////////////////////////////////////////////////// -void QLParseContextPush (QL_parser_context_t*, QL_ast_node_t*); +void TRI_ParseQueryContextPush (TRI_query_template_t* const, TRI_query_node_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief close the current context layer of the parser and return it //////////////////////////////////////////////////////////////////////////////// -QL_ast_node_t* QLParseContextPop (QL_parser_context_t*); +TRI_query_node_t* TRI_ParseQueryContextPop (TRI_query_template_t* const); //////////////////////////////////////////////////////////////////////////////// /// @brief add an element to the current parsing context //////////////////////////////////////////////////////////////////////////////// -void QLParseContextAddElement (QL_parser_context_t*, QL_ast_node_t*); +void TRI_ParseQueryContextAddElement (TRI_query_template_t* const, TRI_query_node_t*); //////////////////////////////////////////////////////////////////////////////// /// @brief pop the current parse context from the stack into the rhs element //////////////////////////////////////////////////////////////////////////////// -void QLPopIntoRhs (QL_ast_node_t*, QL_parser_context_t*); +void TRI_ParseQueryPopIntoRhs (TRI_query_node_t*, TRI_query_template_t* const); + +// ----------------------------------------------------------------------------- +// --SECTION-- validation +// ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @brief Register a parse error +/// @brief Validation function typedef to validate collection names //////////////////////////////////////////////////////////////////////////////// -void QLParseRegisterParseError (QL_parser_context_t*, const QL_error_type_e, ...); +typedef bool(*QL_parser_validate_func) (QL_ast_query_t*, const char*, const size_t); //////////////////////////////////////////////////////////////////////////////// -/// @brief Register a post-parse error -//////////////////////////////////////////////////////////////////////////////// - -void QLParseRegisterPostParseError (QL_parser_context_t*, const int32_t, - const int32_t, const QL_error_type_e, ...); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief Validate the query +/// @brief Validate a collection name /// -/// Currently only validates if all used collection names are actually declared -/// in the query's from clause +/// Currently, a collection name must consist of the letters A-Z or a-z only +/// Its length must not exceed QL_QUERY_NAME_LEN chars. //////////////////////////////////////////////////////////////////////////////// -bool QLParseValidate (QL_parser_context_t*, QL_ast_node_t*); +bool TRI_ParseQueryValidateCollectionName (const char*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Validate a collection alias +/// +/// Currently, a collection name must consist of the letters A-Z or a-z only +/// Its length must not exceed QL_QUERY_NAME_LEN chars. +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ParseQueryValidateCollectionAlias (const char*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief Validate the collections used in a query part +/// +/// Currently validates if all used collection names in the query part are +/// actually declared in the query's from clause. +//////////////////////////////////////////////////////////////////////////////// + +bool TRI_ParseQueryValidateCollections (TRI_query_template_t* const, + TRI_query_node_t*, + QL_parser_validate_func, + size_t*); //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/VocBase/query.c b/VocBase/query.c index fe4abbdcca..a36d716df7 100644 --- a/VocBase/query.c +++ b/VocBase/query.c @@ -28,8 +28,10 @@ #include "query.h" #include +#include "BasicsC/string-buffer.h" #include #include "VocBase/simple-collection.h" +#include "VocBase/join-execute.h" // ----------------------------------------------------------------------------- // --SECTION-- SELECT DOCUMENT @@ -286,6 +288,13 @@ typedef void (*cond_fptr) (collection_cursor_t*, /// @{ //////////////////////////////////////////////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the next element +//////////////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////////////// /// @brief returns the next element //////////////////////////////////////////////////////////////////////////////// @@ -308,6 +317,77 @@ static TRI_rc_result_t* NextCollectionCursor (TRI_rc_cursor_t* c) { return NULL; } + +static bool ToJavaScriptHashDocument (TRI_qry_select_t* s, + TRI_rc_result_t* result, + void* storage) { + + TRI_doc_mptr_t* document; + TRI_doc_collection_t* collection; + + collection = result->_context->_primary; + + /* start oreste + TRI_doc_mptr_t* doc = (TRI_doc_mptr_t*) result->_dataPtr; + TRI_shaped_json_t const* shaped; + TRI_shaper_t* shaper; + TRI_string_buffer_t buffer; + TRI_InitStringBuffer(&buffer); + simCollection = (TRI_sim_collection_t*)(collection); + shaper = simCollection->base._shaper; + shaped = &doc->_document; + TRI_StringifyShapedJson (shaper, &buffer, shaped); + printf("%s:%u:#######:%s\n",__FILE__, __LINE__,buffer._buffer); + printf("%s:%u:%lu:%lu:%lu\n",__FILE__,__LINE__, + (uint64_t)(doc), + (uint64_t)(shaped), + (uint64_t)(shaper)); + + TRI_FreeStringBuffer(&buffer); + end oreste */ + + document = (TRI_doc_mptr_t*) result->_dataPtr; + return TRI_ObjectDocumentPointer(collection, document, storage); +} + +static TRI_rc_result_t* NextHashCollectionCursor (TRI_rc_cursor_t* c) { + collection_cursor_t* cursor; + TRI_doc_collection_t* collection; + + cursor = (collection_cursor_t*) c; + collection = cursor->base._context->_primary; + + if (cursor->_currentRow == cursor->_length) { + return NULL; + } + + cursor->_current = &(cursor->_documents[cursor->_currentRow]); + cursor->_result._dataPtr = (TRI_sr_documents_t*) (cursor->_current); + ++(cursor->_currentRow); + + return &cursor->_result; + +} + +static TRI_rc_result_t* NextSkiplistCollectionCursor (TRI_rc_cursor_t* c) { + collection_cursor_t* cursor; + TRI_doc_collection_t* collection; + + cursor = (collection_cursor_t*) c; + collection = cursor->base._context->_primary; + + if (cursor->_currentRow == cursor->_length) { + return NULL; + } + + cursor->_current = &(cursor->_documents[cursor->_currentRow]); + cursor->_result._dataPtr = (TRI_sr_documents_t*) (cursor->_current); + ++(cursor->_currentRow); + + return &cursor->_result; + +} + //////////////////////////////////////////////////////////////////////////////// /// @brief checks if the cursor is exhausted //////////////////////////////////////////////////////////////////////////////// @@ -332,8 +412,10 @@ static void FreeCollectionCursor (TRI_rc_cursor_t* c) { cursor = (collection_cursor_t*) c; // free result set - cursor->_result._selectResult->free(cursor->_result._selectResult); - + if (cursor->_result._selectResult != NULL) { + cursor->_result._selectResult->free(cursor->_result._selectResult); + } + // free select slct = cursor->base._select; slct->free(slct); @@ -457,8 +539,6 @@ TRI_qry_where_t* TRI_CreateQueryWhereBoolean (bool where) { result->base.base.clone = CloneQueryWhereBoolean; result->base.base.free = FreeQueryWhereBoolean; - //result->base.checkCondition = NULL; - result->_value = where; return &result->base.base; @@ -649,6 +729,23 @@ TRI_qry_where_t* TRI_CreateQueryWhereGeneral (char const* clause) { /// @brief clones a query condition using the geo index and constants //////////////////////////////////////////////////////////////////////////////// +static TRI_qry_where_t* CloneQueryWhereHashConstant (const TRI_qry_where_t* w) { + TRI_qry_where_hash_const_t* whereClause; + + whereClause = (TRI_qry_where_hash_const_t*) w; + + return TRI_CreateQueryWhereHashConstant(whereClause->_iid, whereClause->_parameters); +} + + +static TRI_qry_where_t* CloneQueryWhereSkiplistConstant (const TRI_qry_where_t* w) { + TRI_qry_where_skiplist_const_t* whereClause; + + whereClause = (TRI_qry_where_skiplist_const_t*) w; + + return TRI_CreateQueryWhereSkiplistConstant(whereClause->_iid, whereClause->_parameters); +} + static TRI_qry_where_t* CloneQueryWhereWithinConstant (TRI_qry_where_t const* w) { TRI_qry_where_within_const_t* whereClause; @@ -665,6 +762,20 @@ static TRI_qry_where_t* CloneQueryWhereWithinConstant (TRI_qry_where_t const* w) /// @brief frees a query condition using the geo index and constants //////////////////////////////////////////////////////////////////////////////// +static void FreeQueryWhereHashConstant (TRI_qry_where_t* w) { + TRI_qry_where_hash_const_t* whereClause; + whereClause = (TRI_qry_where_hash_const_t*) w; + TRI_FreeJson(whereClause->_parameters); + TRI_Free(whereClause); +} + +static void FreeQueryWhereSkiplistConstant (TRI_qry_where_t* w) { + TRI_qry_where_skiplist_const_t* whereClause; + whereClause = (TRI_qry_where_skiplist_const_t*) w; + TRI_FreeJson(whereClause->_parameters); + TRI_Free(whereClause); +} + static void FreeQueryWhereWithinConstant (TRI_qry_where_t* w) { TRI_qry_where_within_const_t* whereClause; @@ -747,6 +858,37 @@ TRI_qry_where_t* TRI_CreateQueryWhereWithinConstant (TRI_idx_iid_t iid, return &result->base.base; } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a query condition for hash index +//////////////////////////////////////////////////////////////////////////////// + +TRI_qry_where_t* TRI_CreateQueryWhereHashConstant (TRI_idx_iid_t iid, TRI_json_t* parameters) { + TRI_qry_where_hash_const_t* result; + result = TRI_Allocate(sizeof(TRI_qry_where_hash_const_t)); + result->base._type = TRI_QRY_WHERE_HASH_CONSTANT; + result->base.clone = CloneQueryWhereHashConstant; + result->base.free = FreeQueryWhereHashConstant; + result->_iid = iid; + result->_parameters = parameters; + return &result->base; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a query condition for skiplist index +//////////////////////////////////////////////////////////////////////////////// + +TRI_qry_where_t* TRI_CreateQueryWhereSkiplistConstant (TRI_idx_iid_t iid, TRI_json_t* parameters) { + TRI_qry_where_skiplist_const_t* result; + result = TRI_Allocate(sizeof(TRI_qry_where_skiplist_const_t)); + result->base._type = TRI_QRY_WHERE_SKIPLIST_CONSTANT; + result->base.clone = CloneQueryWhereSkiplistConstant; + result->base.free = FreeQueryWhereSkiplistConstant; + result->_iid = iid; + result->_parameters = parameters; + return &result->base; +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -789,14 +931,61 @@ static bool InitCollectionsQuery (TRI_query_t* query) { } //////////////////////////////////////////////////////////////////////////////// -/// @brief creates a query +/// @brief creates a hash query //////////////////////////////////////////////////////////////////////////////// +TRI_query_t* TRI_CreateHashQuery(const TRI_qry_where_t* whereStmt, + TRI_doc_collection_t* collection) { + TRI_query_t* query; + + query = TRI_Allocate(sizeof(TRI_query_t)); + if (!query) { + return NULL; + } + + query->_where = ( whereStmt == NULL ? NULL : whereStmt->clone(whereStmt)); + query->_skip = TRI_QRY_NO_SKIP; + query->_limit = TRI_QRY_NO_LIMIT; + query->_primary = collection; + query->_joins = NULL; + query->_select = TRI_CreateQuerySelectDocument(); + return query; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a skiplist query +//////////////////////////////////////////////////////////////////////////////// + +TRI_query_t* TRI_CreateSkiplistQuery(const TRI_qry_where_t* whereStmt, + TRI_doc_collection_t* collection) { + TRI_query_t* query; + + query = TRI_Allocate(sizeof(TRI_query_t)); + if (!query) { + return NULL; + } + + query->_where = ( whereStmt == NULL ? NULL : whereStmt->clone(whereStmt)); + query->_skip = TRI_QRY_NO_SKIP; + query->_limit = TRI_QRY_NO_LIMIT; + query->_primary = collection; + query->_joins = NULL; + query->_select = TRI_CreateQuerySelectDocument(); + return query; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a query +//////////////////////////////////////////////////////////////////////////////// + TRI_query_t* TRI_CreateQuery (TRI_vocbase_t* vocbase, - TRI_qry_select_t const* selectStmt, - TRI_qry_where_t const* whereStmt, - TRI_qry_order_t const* orderStmt, - TRI_select_join_t* joins) { + TRI_qry_select_t* selectStmt, + TRI_qry_where_t* whereStmt, + TRI_qry_order_t* orderStmt, + TRI_select_join_t* joins, + TRI_voc_size_t skip, + TRI_voc_ssize_t limit) { TRI_query_t* query; query = TRI_Allocate(sizeof(TRI_query_t)); @@ -805,12 +994,12 @@ TRI_query_t* TRI_CreateQuery (TRI_vocbase_t* vocbase, } query->_vocbase = vocbase; - query->_select = selectStmt->clone(selectStmt); - query->_where = whereStmt == NULL ? NULL : whereStmt->clone(whereStmt); - query->_order = orderStmt == NULL ? NULL : orderStmt->clone(orderStmt); + query->_select = selectStmt; + query->_where = whereStmt; + query->_order = orderStmt; query->_joins = joins; - query->_skip = TRI_QRY_NO_SKIP; - query->_limit = TRI_QRY_NO_LIMIT; + query->_skip = skip; + query->_limit = limit; if (!InitCollectionsQuery(query)) { TRI_FreeQuery(query); @@ -853,7 +1042,7 @@ TRI_rc_context_t* TRI_CreateContextQuery (TRI_query_t* query) { context = TRI_Allocate(sizeof(TRI_rc_context_t)); context->_primary = query->_primary; - + // check if we need a JavaScript execution context if (query->_select->_type == TRI_QRY_SELECT_GENERAL) { selectGeneral = (TRI_qry_select_general_t*) query->_select; @@ -932,6 +1121,12 @@ void TRI_ReadLockCollectionsQuery (TRI_query_t* query) { TRI_join_part_t* part; size_t i; + if (query->_joins == NULL) { + query->_primary->beginRead(query->_primary); + return; + } + + // note: the same collection might be read-locked multiple times here for (i = 0; i < query->_joins->_parts._length; i++) { part = (TRI_join_part_t*) query->_joins->_parts._buffer[i]; @@ -946,9 +1141,15 @@ void TRI_ReadLockCollectionsQuery (TRI_query_t* query) { void TRI_ReadUnlockCollectionsQuery (TRI_query_t* query) { TRI_join_part_t* part; - size_t i = query->_joins->_parts._length; + size_t i; + if (query->_joins == NULL) { + query->_primary->endRead(query->_primary); + return; + } + // note: the same collection might be read-unlocked multiple times here + i = query->_joins->_parts._length; while (i > 0) { i--; part = (TRI_join_part_t*) query->_joins->_parts._buffer[i]; @@ -963,14 +1164,21 @@ void TRI_ReadUnlockCollectionsQuery (TRI_query_t* query) { void TRI_AddCollectionsCursor (TRI_rc_cursor_t* cursor, TRI_query_t* query) { TRI_join_part_t* part; - TRI_rs_container_element_t* ce; + TRI_barrier_t* ce; size_t i; + if (query->_joins == NULL) { + ce = TRI_CreateBarrierElement(&query->_primary->_barrierList); + TRI_PushBackVectorPointer(&cursor->_containers, ce); + return; + } + + // note: the same collection might be added multiple times here for (i = 0; i < query->_joins->_parts._length; i++) { part = (TRI_join_part_t*) query->_joins->_parts._buffer[i]; assert(part->_collection); - ce = TRI_AddResultSetRSContainer(&part->_collection->_resultSets); + ce = TRI_CreateBarrierElement(&part->_collection->_barrierList); TRI_PushBackVectorPointer(&cursor->_containers, ce); } } @@ -981,13 +1189,13 @@ void TRI_AddCollectionsCursor (TRI_rc_cursor_t* cursor, TRI_query_t* query) { //////////////////////////////////////////////////////////////////////////////// void TRI_RemoveCollectionsCursor (TRI_rc_cursor_t* cursor) { - TRI_rs_container_element_t* ce; + TRI_barrier_t* ce; size_t i; for (i = 0; i < cursor->_containers._length; ++i) { ce = cursor->_containers._buffer[i]; - TRI_RemoveRSContainer(ce); + TRI_FreeBarrier(ce); } cursor->_containers._length = 0; @@ -997,6 +1205,185 @@ void TRI_RemoveCollectionsCursor (TRI_rc_cursor_t* cursor) { /// @brief executes a query //////////////////////////////////////////////////////////////////////////////// +static void FilterDataHashQuery(collection_cursor_t* cursor,TRI_query_t* query, + TRI_rc_context_t* context) { + + bool ok; + TRI_index_t* idx; + TRI_qry_where_hash_const_t* where; + TRI_sim_collection_t* collection; + HashIndexElements* hashElements; + TRI_doc_mptr_t* wtr; + TRI_doc_mptr_t* doc; + + cursor->base._context = context; + cursor->base._select = query->_select->clone(query->_select); + + cursor->base.next = NextHashCollectionCursor; + cursor->base.hasNext = HasNextCollectionCursor; + cursor->base.free = FreeCollectionCursor; + cursor->_result._selectResult = NULL; + + cursor->_result._context = context; + cursor->_result._dataPtr = NULL; + + cursor->base._select->toJavaScript = ToJavaScriptHashDocument; + + TRI_InitVectorPointer(&cursor->base._containers); + + TRI_ReadLockCollectionsQuery(query); + + TRI_AddCollectionsCursor(&cursor->base, query); + + ok = (query->_primary->base._type == TRI_COL_TYPE_SIMPLE_DOCUMENT); + + if (ok) { + where = (TRI_qry_where_hash_const_t*)(query->_where); + ok = (where->base._type == TRI_QRY_WHERE_HASH_CONSTANT); + } + + if (ok) { + collection = (TRI_sim_collection_t*) query->_primary; + idx = TRI_IndexSimCollection(collection, where->_iid); + ok = (idx != NULL); + } + + if (ok) { + hashElements = TRI_LookupHashIndex(idx,where->_parameters); + ok = (hashElements != NULL); + } + + + if (ok) { + cursor->_documents = (TRI_doc_mptr_t*) (TRI_Allocate(sizeof(TRI_doc_mptr_t) * hashElements->_numElements)); + + wtr = cursor->_documents; + cursor->_length = 0; + cursor->base._matchedDocuments = 0; + cursor->_current = 0; + cursor->_currentRow = 0; + + for (size_t j = 0; j < hashElements->_numElements; ++j) { + // should not be necessary to check that documents have not been deleted + doc = (TRI_doc_mptr_t*)((hashElements->_elements[j]).data); + if (doc->_deletion) { + continue; + } + if (cursor->_current == 0) { + cursor->_current = wtr; + } + ++cursor->base._matchedDocuments; + ++cursor->_length; + *wtr = *doc; + ++wtr; + } + + + if (hashElements->_elements != NULL) { + TRI_Free(hashElements->_elements); + TRI_Free(hashElements); + } + } + + TRI_ReadUnlockCollectionsQuery(query); + + if (!ok) { + cursor->_length = 0; + cursor->_currentRow = 0; + } + +} + + +static void FilterDataSLQuery(collection_cursor_t* cursor,TRI_query_t* query, + TRI_rc_context_t* context) { + + bool ok; + TRI_index_t* idx; + TRI_qry_where_skiplist_const_t* where; + TRI_sim_collection_t* collection; + SkiplistIndexElements* skiplistElements; + TRI_doc_mptr_t* wtr; + TRI_doc_mptr_t* doc; + + cursor->base._context = context; + cursor->base._select = query->_select->clone(query->_select); + + cursor->base.next = NextSkiplistCollectionCursor; + cursor->base.hasNext = HasNextCollectionCursor; + cursor->base.free = FreeCollectionCursor; + cursor->_result._selectResult = NULL; + + cursor->_result._context = context; + cursor->_result._dataPtr = NULL; + + cursor->base._select->toJavaScript = ToJavaScriptHashDocument; + + TRI_InitVectorPointer(&cursor->base._containers); + + TRI_ReadLockCollectionsQuery(query); + + TRI_AddCollectionsCursor(&cursor->base, query); + + ok = (query->_primary->base._type == TRI_COL_TYPE_SIMPLE_DOCUMENT); + + if (ok) { + where = (TRI_qry_where_skiplist_const_t*)(query->_where); + ok = (where->base._type == TRI_QRY_WHERE_SKIPLIST_CONSTANT); + } + + if (ok) { + collection = (TRI_sim_collection_t*) query->_primary; + idx = TRI_IndexSimCollection(collection, where->_iid); + ok = (idx != NULL); + } + + if (ok) { + skiplistElements = TRI_LookupSkiplistIndex(idx,where->_parameters); + ok = (skiplistElements != NULL); + } + + + if (ok) { + cursor->_documents = (TRI_doc_mptr_t*) (TRI_Allocate(sizeof(TRI_doc_mptr_t) * skiplistElements->_numElements)); + + wtr = cursor->_documents; + cursor->_length = 0; + cursor->base._matchedDocuments = 0; + cursor->_current = 0; + cursor->_currentRow = 0; + + for (size_t j = 0; j < skiplistElements->_numElements; ++j) { + // should not be necessary to check that documents have not been deleted + doc = (TRI_doc_mptr_t*)((skiplistElements->_elements[j]).data); + if (doc->_deletion) { + continue; + } + if (cursor->_current == 0) { + cursor->_current = wtr; + } + ++cursor->base._matchedDocuments; + ++cursor->_length; + *wtr = *doc; + ++wtr; + } + + + if (skiplistElements->_elements != NULL) { + TRI_Free(skiplistElements->_elements); + TRI_Free(skiplistElements); + } + } + + TRI_ReadUnlockCollectionsQuery(query); + + if (!ok) { + cursor->_length = 0; + cursor->_currentRow = 0; + } + +} + TRI_rc_cursor_t* TRI_ExecuteQueryAql (TRI_query_t* query, TRI_rc_context_t* context) { TRI_qry_where_t* where; TRI_voc_size_t skip; @@ -1011,6 +1398,7 @@ TRI_rc_cursor_t* TRI_ExecuteQueryAql (TRI_query_t* query, TRI_rc_context_t* cont limit = query->_limit; applyPostSkipLimit = false; + if (limit < 0) { limit = TRI_QRY_NO_LIMIT; skip = 0; @@ -1023,7 +1411,7 @@ TRI_rc_cursor_t* TRI_ExecuteQueryAql (TRI_query_t* query, TRI_rc_context_t* cont skip = 0; applyPostSkipLimit = true; } - + if (query->_order == NULL) { order = NULL; } @@ -1031,6 +1419,7 @@ TRI_rc_cursor_t* TRI_ExecuteQueryAql (TRI_query_t* query, TRI_rc_context_t* cont order = TRI_OrderDataGeneralQuery; } + // set up where condition emptyQuery = false; where = 0; @@ -1051,10 +1440,27 @@ TRI_rc_cursor_t* TRI_ExecuteQueryAql (TRI_query_t* query, TRI_rc_context_t* cont else if (where->_type == TRI_QRY_WHERE_WITHIN_CONSTANT) { assert(false); } + else if (where->_type == TRI_QRY_WHERE_HASH_CONSTANT) { + cursor = TRI_Allocate(sizeof(collection_cursor_t)); + if (cursor == NULL) { + return NULL; + } + FilterDataHashQuery(cursor,query,context); + return &cursor->base; + } + else if (where->_type == TRI_QRY_WHERE_SKIPLIST_CONSTANT) { + cursor = TRI_Allocate(sizeof(collection_cursor_t)); + if (cursor == NULL) { + return NULL; + } + FilterDataSLQuery(cursor,query,context); + printf("%s:%d\n",__FILE__,__LINE__); + return &cursor->base; + } } // create a select result container for the joins - selectResult = TRI_JoinSelectResult(query->_joins); + selectResult = TRI_JoinSelectResult(query->_vocbase, query->_joins); if (!selectResult) { return NULL; } diff --git a/VocBase/query.h b/VocBase/query.h index fc70dbeb1d..227b473bc5 100644 --- a/VocBase/query.h +++ b/VocBase/query.h @@ -31,11 +31,11 @@ #include "VocBase/vocbase.h" #include "ShapedJson/shaped-json.h" -#include "V8/v8-c-utils.h" +//#include "V8/v8-c-utils.h" #include "VocBase/document-collection.h" #include "VocBase/index.h" #include "VocBase/join.h" -#include "VocBase/join-execute.h" +//#include "VocBase/join-execute.h" #include "VocBase/where.h" #include "VocBase/order.h" @@ -94,14 +94,14 @@ extern "C" { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// -/// @page AQL Avocado Query Language +/// @page AQL Avocado Query Language (AQL) /// /// Queries can be used to extract arbitrary data from one or multiple /// collections. A query needs to be composed in the Avocado Query Language /// (AQL). /// /// The purpose of AQL is somewhat similar to SQL, but the language has -/// notable differences to it. This means that AQL queries cannot be run in +/// notable differences to SQL. This means that AQL queries cannot be run in /// an SQL database and vice versa. /// /// @section AqlBasics Language basics @@ -109,10 +109,14 @@ extern "C" { /// AQL consists mainly of keywords, names, literals, compound types, and /// operators. /// +/// An example AQL query looks like this: +/// +/// @verbinclude query0 +/// /// @subsection AqlKeywords Keywords /// -/// For example, the terms @CODE{SELECT}, @CODE{FROM}, @CODE{JOIN}, and -/// @CODE{WHERE} are keywords. Keywords have a special meaning in the language +/// For example, the terms @LIT{SELECT}, @LIT{FROM}, @LIT{JOIN}, and +/// @LIT{WHERE} are keywords. Keywords have a special meaning in the language /// and are used by the language parser to uniquely identify the meaning of a /// query part. /// @@ -129,15 +133,14 @@ extern "C" { /// @subsection AqlNames Names /// /// In general, names are used to identify objects (collections, attributes, -/// functions in queries. Allowed characters in names are the letters @LIT{a} -/// to @LIT{z} (both in lower and upper case), the numbers @LIT{0} to @LIT{9}, -/// and the underscore (@LIT{_}) symbol. -/// -/// A name must not start with a number. If a name starts with the underscore -/// character, it must also contain at least of letter character. +/// functions in queries. /// -/// The maximum length of a name is 64 bytes. All names are case-sensitive. -/// Keywords must not be used as names. +/// The maximum length of any name is 64 bytes. All names are case-sensitive. +/// +/// Keywords must not be used as names. Instead, if a reserved keyword should +/// be as used a query, the name must be enclosed in backticks. Enclosing a +/// name in backticks allows to use otherwise-reserved words as names, e.g. +/// @LIT{`select`}. /// /// @subsubsection AqlCollectionNames Collection names and aliases /// @@ -147,6 +150,16 @@ extern "C" { /// it is unique within the context of the query. This means the same alias /// cannot be declared multiple times in the same query. /// +/// Allowed characters in collection names are the letters @LIT{a} to @LIT{z} +/// (both in lower and upper case) and the numbers @LIT{0} to @LIT{9}. A +/// collection name must always start with a letter. +/// +/// Allowed characters in aliases are the letters @LIT{a} to @LIT{z} (both in +/// lower and upper case), the numbers @LIT{0} to @LIT{9} and the underscore +/// (@LIT{_}) symbol. An alias must not start with a number. If an alias +/// starts with the underscore character, it must also contain at least one +/// letter (a-z or A-Z). +/// /// @verbinclude collectionnames /// /// @subsubsection AqlAttributeNames Attribute names @@ -174,8 +187,11 @@ extern "C" { /// /// @verbinclude strings /// -/// The string encoding is always UTF-8. It is not possible to store arbitrary -/// binary data if it is not UTF-8 encoded. +/// The string encoding is always UTF-8. It is currently not possible to use +/// arbitrary binary data if it is not UTF-8 encoded. A workaround to use +/// binary data is to encode the data using base64 or other algorithms on the +/// application side before storing, and decoding it on application side after +/// retrieval. /// /// @subsubsection AqlLiteralsNumber Numeric literals /// @@ -191,8 +207,8 @@ extern "C" { /// @subsubsection AqlLiteralsSpecial Special values /// /// There are also special predefined literals for the boolean values -/// @CODE{true} and @CODE{false}. There are also predefined @CODE{null} and -/// @CODE{undefined} values. +/// @LIT{true} and @LIT{false}. There are also predefined @LIT{null} and +/// @LIT{undefined} values. /// /// @verbinclude specials /// @@ -296,13 +312,17 @@ extern "C" { /// The @LIT{!} operator returns boolean value. /// /// The @LIT{&&} operator returns the first operand if it evaluates to -/// @CODE{false}. It returns the result of the evaluation of the second -/// operand otherwise. +/// @LIT{false}. It returns the result of the evaluation of the second +/// operand otherwise. /// /// The @LIT{||} operators returns the first operand if it evaluates to -/// @CODE{true}. Otherwise it returns the result of the evaluation of +/// @LIT{true}. Otherwise it returns the result of the evaluation of /// the second operand. /// +/// Both @LIT{&&} and @LIT{||} use short-circuit evaluation and only +/// evaluate the second operand if the result of the operation cannot be +/// determined by the first operand alone. +/// /// @subsubsection AqlOperatorsArit Arithmetic operators /// /// The following arithmetic operators are supported: @@ -376,7 +396,7 @@ extern "C" { /// The @LIT{select-expression} determines the structure of the documents to /// be returned by the select. /// There are two ways to define the structure of the documents to return. -/// Therefore, the @LIT{select-expression} can either be @CODE{collection-alias} +/// Therefore, the @LIT{select-expression} can either be @LIT{collection-alias} /// or a newly constructed document. /// /// To select all documents from a collection without alteration use the @@ -433,7 +453,7 @@ extern "C" { /// @subsection AqlJoin Multi collection access (joins) /// /// Data from multiple collections can be accessed together in one query, provided -/// the documents match. This is called joining. +/// the documents from the collections satisfy some criteria. This is called joining. /// There are 3 different types of joins, but all have the same structure: /// /// @verbinclude join @@ -442,6 +462,7 @@ extern "C" { /// @LIT{collection-definition}s. @LIT{join-type} is one of /// - @LIT{INNER JOIN} /// - @LIT{LEFT JOIN} +/// - @LIT{RIGHT JOIN} /// - @LIT{LIST JOIN} /// /// The @LIT{on-expression} consists of the @LIT{ON} keyword, followed by @@ -449,10 +470,13 @@ extern "C" { /// /// The @LIT{left-collection} and @LIT{right-collection} values define which /// collections should be joined to together, the @LIT{join-types} determines -/// how to join, and the @CODE{on-expression} determines what is considered a -/// match. +/// how to join, and the @LIT{on-expression} determines what match criteria should +/// be applied. /// -/// Multiple joins are evaluated from left to right. +/// Multiple joins are evaluated from left to right. That means @LIT{on-expression}s +/// can only contain references to collections that have been specified before +/// (left) of them. References to collections specified on the right of them +/// will cause a parse error. /// /// @subsubsection AllInnerJoin Inner join /// @@ -466,10 +490,10 @@ extern "C" { /// right side (and vice versa), this means that each document from either /// side might appear multiple times in the result. /// -/// @subsubsection AllOuterJoin Left (outer) join +/// @subsubsection AllOuterJoin Left and right (outer) joins /// -/// A left (outer) join outputs the documents from both the left and right hand sides -/// of the join if, and only if the @LIT{on-condition} is true. +/// A left (outer) join outputs the documents from both the left and right hand +/// sides of the join if, and only if the @LIT{on-condition} is true. /// /// Additionally, it will output the document on the left hand side of the join /// if no matching document on the right side can be found. If this is the case, @@ -487,8 +511,9 @@ extern "C" { /// once. Altogether this means all documents from the left hand side will be /// contained in the result set at least once. /// -/// Right joins are currently not supported, but they can be expressed as left -/// joins with the operands swapped. +/// A right (outer) join acts like a left (outer join) but the roles of the +/// left and right operands are swapped. Thus, right joins are implemented as +/// reversed left joins (i.e. left joins with their operands swapped). /// /// @subsubsection AllInnerJoin List join /// @@ -499,6 +524,51 @@ extern "C" { /// /// @verbinclude joinleft /// +/// @subsection GeoQueries Geo restrictions +/// +/// AQL supports special geo restrictions in case a collection has a geo index +/// defined for it. These queries can be used to find document that have coordinates +/// attached to them that are located around some two-dimensional geo point +/// (reference point). +/// +/// There are two types of geo queries: +/// - WITHIN: finds all documents that have coordinates that are within a certain +/// radius around the reference point +/// - NEAR: finds the first n documents whose coordinates have the least distance +/// to the reference point +/// +/// For all geo queries, the distance between the coordinates as specified in the +/// document and the reference point. This distance is returned as an additional +/// (virtual) collection. This collection can be used in other parts of the +/// query (e.g. WHERE condition) by using its alias. +/// +/// Geo queries extend the FROM/JOIN syntax as follows: +/// +/// @verbinclude geoquery +/// +/// For the @LIT{geo-alias}, the same naming rules apply as for normal collections. +/// It must be unique within the query. The @LIT{document-coordinate} can either be +/// an array of two attribute names, or two separate attribute names, separated by +/// a comma. The attribute names in @LIT{document-coordinate} must refer to the +/// @LIT{collection-alias} specified directly before the geo query. The first +/// attribute is interpreted as the latitude attribute name, the second as the +/// longitude attribute name. +/// +/// The reference coordinate can either be an array of two numbers, or or two +/// separate numbers, separated by a comma. The first number is interpreted as the +/// latitude value, the second number as the longitude value of the reference point. +/// +/// @verbinclude geo1 +/// +/// For WITHIN, the @LIT{radius} is specified in meters. +/// For NEAR, the @LIT{number-of-documents} value will restrict the result to at +/// most this number of documents. +/// +/// Geo restrictions can be used for joined collections as well. In this case, the +/// restriction is applied first to find the relevant documents from the collection, +/// and afterwards, the ON condition specified for the join is evaluated. Evaluating +/// the ON condition might further reduce the result. +/// /// @section AqlWhere Where clause /// /// The where clause can be specified to restrict the result to documents that @@ -508,6 +578,8 @@ extern "C" { /// expression that defines the search condition. A document is included /// in the result if the search condition evaluates to @LIT{true}. /// +/// Geo restrictions cannot be used in the where clause. +/// /// @section AqlParameter Parameters /// /// AQL supports usage of query parameters, thus allowing to separate the @@ -745,11 +817,17 @@ TRI_rc_cursor_t; /// @brief creates a query //////////////////////////////////////////////////////////////////////////////// -TRI_query_t* TRI_CreateQuery (TRI_vocbase_t* vocBase, - TRI_qry_select_t const* selectStmt, - TRI_qry_where_t const* whereStmt, - TRI_qry_order_t const* orderStmt, - TRI_select_join_t* joins); +TRI_query_t* TRI_CreateHashQuery (const TRI_qry_where_t*, TRI_doc_collection_t*); + +TRI_query_t* TRI_CreateSkiplistQuery (const TRI_qry_where_t*, TRI_doc_collection_t*); + +TRI_query_t* TRI_CreateQuery (TRI_vocbase_t*, + TRI_qry_select_t*, + TRI_qry_where_t*, + TRI_qry_order_t*, + TRI_select_join_t*, + TRI_voc_size_t, + TRI_voc_ssize_t); //////////////////////////////////////////////////////////////////////////////// /// @brief frees a query @@ -793,6 +871,19 @@ TRI_qry_where_t* TRI_CreateQueryWhereBoolean (bool where); TRI_qry_where_t* TRI_CreateQueryWhereGeneral (char const*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a query condition for a hash with constant parameters +//////////////////////////////////////////////////////////////////////////////// + +TRI_qry_where_t* TRI_CreateQueryWhereHashConstant (TRI_idx_iid_t, TRI_json_t*); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief creates a query condition for a hash with constant parameters +//////////////////////////////////////////////////////////////////////////////// + +TRI_qry_where_t* TRI_CreateQueryWhereSkiplistConstant (TRI_idx_iid_t, TRI_json_t*); + //////////////////////////////////////////////////////////////////////////////// /// @brief creates a query condition using the primary index and a constant //////////////////////////////////////////////////////////////////////////////// diff --git a/VocBase/result-set.c b/VocBase/result-set.c deleted file mode 100644 index 1dfb51caf9..0000000000 --- a/VocBase/result-set.c +++ /dev/null @@ -1,642 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -/// @brief result set -/// -/// @file -/// -/// DISCLAIMER -/// -/// Copyright 2010-2011 triagens 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 triAGENS GmbH, Cologne, Germany -/// -/// @author Dr. Frank Celler -/// @author Copyright 2011, triagens GmbH, Cologne, Germany -//////////////////////////////////////////////////////////////////////////////// - -#include "result-set.h" - -#include -#include - -#include - -// ----------------------------------------------------------------------------- -// --SECTION-- forward declarations -// ----------------------------------------------------------------------------- - -static void RemoveContainerElement (TRI_result_set_t* rs); - -// ----------------------------------------------------------------------------- -// --SECTION-- SINGLE RESULT SETS -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private types -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief result set storing a single result -//////////////////////////////////////////////////////////////////////////////// - -typedef struct doc_rs_single_s { - TRI_result_set_t base; - - bool _empty; - - TRI_rs_entry_t _entry; - TRI_voc_size_t _total; -} -doc_rs_single_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief empty check for single result sets -//////////////////////////////////////////////////////////////////////////////// - -static bool HasNextRSSingle (TRI_result_set_t* rs) { - doc_rs_single_t* rss; - - rss = (doc_rs_single_t*) rs; - return ! rss->_empty; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the current element of a single result set -//////////////////////////////////////////////////////////////////////////////// - -static TRI_rs_entry_t const* NextRSSingle (TRI_result_set_t* rs) { - doc_rs_single_t* rss; - - rss = (doc_rs_single_t*) rs; - - if (rss->_empty) { - return NULL; - } - else { - rss->_empty = true; - return &rss->_entry; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the number of elements -//////////////////////////////////////////////////////////////////////////////// - -static TRI_voc_size_t CountRSSingle (TRI_result_set_t* rs, bool current) { - doc_rs_single_t* rss; - - rss = (doc_rs_single_t*) rs; - return rss->_total; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees the single result set -//////////////////////////////////////////////////////////////////////////////// - -static void FreeRSSingle (TRI_result_set_t* rs) { - RemoveContainerElement(rs); - - TRI_Free(rs->_info._cursor); - TRI_Free(rs); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- constructors and destructors -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a single result set -//////////////////////////////////////////////////////////////////////////////// - -TRI_result_set_t* TRI_CreateRSSingle (TRI_doc_collection_t* collection, - TRI_rs_container_element_t* containerElement, - TRI_doc_mptr_t const* header, - TRI_voc_size_t total) { - doc_rs_single_t* rs; - - rs = TRI_Allocate(sizeof(doc_rs_single_t)); - - rs->base._error = NULL; - - rs->base.hasNext = HasNextRSSingle; - rs->base.next = NextRSSingle; - rs->base.count = CountRSSingle; - rs->base.free = FreeRSSingle; - - rs->base._id = TRI_NewTickVocBase(); - rs->base._containerElement = containerElement; - - if (header == NULL) { - rs->_empty = true; - } - else { - rs->_empty = false; - - rs->_entry._document = header->_document; - rs->_entry._augmented._type = TRI_JSON_UNUSED; - rs->_entry._type = ((TRI_df_marker_t*) header->_data)->_type; - - rs->_entry._did = header->_did; - rs->_entry._rid = header->_rid; - - if (rs->_entry._type == TRI_DOC_MARKER_EDGE) { - TRI_doc_edge_marker_t* marker = (TRI_doc_edge_marker_t*) header->_data; - - rs->_entry._fromCid = marker->_fromCid; - rs->_entry._fromDid = marker->_fromDid; - rs->_entry._toCid = marker->_toCid; - rs->_entry._toDid = marker->_toDid; - } - else { - rs->_entry._fromCid = 0; - rs->_entry._fromDid = 0; - rs->_entry._toCid = 0; - rs->_entry._toDid = 0; - } - } - - rs->_total = total; - - return &rs->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- VECTOR RESULT SETS -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private types -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief result set stored as a vector of document -//////////////////////////////////////////////////////////////////////////////// - -typedef struct doc_rs_vector_s { - TRI_result_set_t base; - - TRI_rs_entry_t* _entries; - - TRI_voc_size_t _length; - TRI_voc_size_t _current; - TRI_voc_size_t _total; -} -doc_rs_vector_t; - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief empty check for vector result sets -//////////////////////////////////////////////////////////////////////////////// - -static bool HasNextRSVector (TRI_result_set_t* rs) { - doc_rs_vector_t* rss; - - rss = (doc_rs_vector_t*) rs; - return rss->_current < rss->_length; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the current element of a vector result set -//////////////////////////////////////////////////////////////////////////////// - -static TRI_rs_entry_t const* NextRSVector (TRI_result_set_t* rs) { - doc_rs_vector_t* rss; - - rss = (doc_rs_vector_t*) rs; - - if (rss->_current < rss->_length) { - return &rss->_entries[rss->_current++]; - } - else { - return NULL; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief returns the number of elements -//////////////////////////////////////////////////////////////////////////////// - -static TRI_voc_size_t CountRSVector (TRI_result_set_t* rs, bool current) { - doc_rs_vector_t* rss; - - rss = (doc_rs_vector_t*) rs; - - if (current) { - return rss->_length; - } - else { - return rss->_total; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief frees the vector result set -//////////////////////////////////////////////////////////////////////////////// - -static void FreeRSVector (TRI_result_set_t* rs) { - doc_rs_vector_t* rss; - TRI_rs_entry_t* ptr; - TRI_rs_entry_t* end; - - rss = (doc_rs_vector_t*) rs; - - RemoveContainerElement(rs); - - if (rss->_entries != NULL) { - ptr = rss->_entries; - end = rss->_entries + rss->_length; - - for (; ptr < end; ++ptr) { - TRI_DestroyJson(&ptr->_augmented); - } - - TRI_Free(rss->_entries); - } - - TRI_Free(rs->_info._cursor); - TRI_Free(rs); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- constructors and destructors -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief creates a full result set -//////////////////////////////////////////////////////////////////////////////// - -TRI_result_set_t* TRI_CreateRSVector (TRI_doc_collection_t* collection, - TRI_rs_container_element_t* containerElement, - TRI_doc_mptr_t const** header, - TRI_json_t const* augmented, - TRI_voc_size_t length, - TRI_voc_size_t total) { - TRI_doc_mptr_t const** qtr; - TRI_json_t const* atr; - TRI_rs_entry_t* end; - TRI_rs_entry_t* ptr; - doc_rs_vector_t* rs; - - rs = TRI_Allocate(sizeof(doc_rs_vector_t)); - - rs->base._error = NULL; - - rs->base.hasNext = HasNextRSVector; - rs->base.next = NextRSVector; - rs->base.count = CountRSVector; - rs->base.free = FreeRSVector; - - rs->base._id = TRI_NewTickVocBase(); - rs->base._containerElement = containerElement; - - if (length == 0) { - rs->_length = 0; - rs->_current = 0; - rs->_entries = NULL; - } - else { - TRI_doc_edge_marker_t const* edge; - - rs->_length = length; - rs->_current = 0; - rs->_entries = TRI_Allocate(length * sizeof(TRI_rs_entry_t)); - - qtr = header; - atr = augmented; - - ptr = rs->_entries; - end = ptr + length; - - for (; ptr < end; ++ptr, ++qtr, ++atr) { - edge = (*qtr)->_data; - - (*ptr)._document = (*qtr)->_document; - (*ptr)._type = edge->base.base._type; - - if (augmented == NULL) { - (*ptr)._augmented._type = TRI_JSON_UNUSED; - } - else { - (*ptr)._augmented = *atr; - } - - (*ptr)._did = (*qtr)->_did; - (*ptr)._rid = (*qtr)->_rid; - - if ((*ptr)._type == TRI_DOC_MARKER_EDGE) { - (*ptr)._fromCid = edge->_fromCid; - (*ptr)._fromDid = edge->_fromDid; - (*ptr)._toCid = edge->_toCid; - (*ptr)._toDid = edge->_toDid; - } - } - } - - rs->_total = total; - - return &rs->base; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- RESULT SETS CONTAINER -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- -// --SECTION-- private functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief removes a result set from the doubly linked list -//////////////////////////////////////////////////////////////////////////////// - -static void RemoveContainerElement (TRI_result_set_t* rs) { - TRI_rs_container_t* container; - TRI_rs_container_element_t* element; - - element = rs->_containerElement; - container = element->_container; - - TRI_LockSpin(&container->_lock); - - // element is at the beginning of the chain - if (element->_prev == NULL) { - container->_begin = element->_next; - } - else { - element->_prev->_next = element->_next; - } - - // element is at the end of the chain - if (element->_next == NULL) { - container->_end = element->_prev; - } - else { - element->_next->_prev = element->_prev; - } - - TRI_UnlockSpin(&container->_lock); - - // free the element - TRI_Free(element); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- constructors and destructors -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief initialises a result set container -//////////////////////////////////////////////////////////////////////////////// - -void TRI_InitRSContainer (TRI_rs_container_t* container, TRI_doc_collection_t* collection) { - container->_collection = collection; - - TRI_InitSpin(&container->_lock); - - container->_begin = NULL; - container->_end = NULL; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief destroys a result set container -//////////////////////////////////////////////////////////////////////////////// - -void TRI_DestroyRSContainer (TRI_rs_container_t* container) { - TRI_rs_container_element_t* ptr; - TRI_rs_container_element_t* next; - - ptr = container->_begin; - - while (ptr != NULL) { - next = ptr->_next; - ptr->_container = NULL; - ptr = next; - } - - TRI_DestroySpin(&container->_lock); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- public functions -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup VocBase -/// @{ -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// @brief adds a result set to the end of the doubly linked list -//////////////////////////////////////////////////////////////////////////////// - -TRI_rs_container_element_t* TRI_AddResultSetRSContainer (TRI_rs_container_t* container) { - TRI_rs_container_element_t* element; - - element = TRI_Allocate(sizeof(TRI_rs_container_element_t)); - - element->_type = TRI_RSCE_RESULT_SET; - element->_container = container; - element->_resultSet = NULL; - element->_datafile = NULL; - element->datafileCallback = NULL; - - TRI_LockSpin(&container->_lock); - - // empty list - if (container->_end == NULL) { - element->_next = NULL; - element->_prev = NULL; - - container->_begin = element; - container->_end = element; - } - - // add to the end - else { - element->_next = NULL; - element->_prev = container->_end; - - container->_end->_next = element; - container->_end = element; - } - - TRI_UnlockSpin(&container->_lock); - - return element; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief adds an callback to the result set container -//////////////////////////////////////////////////////////////////////////////// - -TRI_rs_container_element_t* TRI_AddDatafileRSContainer (TRI_rs_container_t* container, - TRI_datafile_t* datafile, - void (*callback) (struct TRI_datafile_s*, void*), - void* data) { - TRI_rs_container_element_t* element; - - element = TRI_Allocate(sizeof(TRI_rs_container_element_t)); - - element->_type = TRI_RSCE_DATAFILE; - element->_container = container; - element->_resultSet = NULL; - element->_datafile = datafile; - element->_datafileData = data; - element->datafileCallback = callback; - - TRI_LockSpin(&container->_lock); - - // empty list - if (container->_end == NULL) { - element->_next = NULL; - element->_prev = NULL; - - container->_begin = element; - container->_end = element; - } - - // add to the end - else { - element->_next = NULL; - element->_prev = container->_end; - - container->_end->_next = element; - container->_end = element; - } - - TRI_UnlockSpin(&container->_lock); - - return element; -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief removes a result set from the doubly linked list -//////////////////////////////////////////////////////////////////////////////// - -void TRI_RemoveRSContainer (TRI_rs_container_element_t* element) { - TRI_rs_container_t* container; - - container = element->_container; - - TRI_LockSpin(&container->_lock); - - // element is at the beginning of the chain - if (element->_prev == NULL) { - container->_begin = element->_next; - } - else { - element->_prev->_next = element->_next; - } - - // element is at the end of the chain - if (element->_next == NULL) { - container->_end = element->_prev; - } - else { - element->_next->_prev = element->_prev; - } - - TRI_UnlockSpin(&container->_lock); - - // free the element - TRI_Free(element); -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// Local Variables: -// mode: outline-minor -// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" -// End: diff --git a/VocBase/select-result.c b/VocBase/select-result.c index 74a7918cb7..83a1422e9f 100644 --- a/VocBase/select-result.c +++ b/VocBase/select-result.c @@ -92,19 +92,28 @@ static void FreeDataPart (TRI_select_datapart_t* datapart) { TRI_select_datapart_t* TRI_CreateDataPart(const char* alias, const TRI_doc_collection_t* collection, - const TRI_select_part_e type) { + const TRI_select_part_e type, + const size_t extraDataSize) { TRI_select_datapart_t* datapart; + + if (extraDataSize) { + assert(!collection); + } + if (collection) { + assert(extraDataSize == 0); + } datapart = (TRI_select_datapart_t*) TRI_Allocate(sizeof(TRI_select_datapart_t)); if (!datapart) { return NULL; } - datapart->_alias = TRI_DuplicateString(alias); - datapart->_collection = (TRI_doc_collection_t*) collection; - datapart->_type = type; + datapart->_alias = TRI_DuplicateString(alias); + datapart->_collection = (TRI_doc_collection_t*) collection; + datapart->_type = type; + datapart->_extraDataSize = extraDataSize; - datapart->free = FreeDataPart; + datapart->free = FreeDataPart; return datapart; } @@ -218,7 +227,7 @@ static bool IncreaseIndexStorageSelectResult (TRI_select_result_t* result, assert(newSize > result->_index._numAllocated); - start = realloc(result->_index._start, newSize * sizeof(TRI_sr_index_t)); + start = TRI_Reallocate(result->_index._start, newSize * sizeof(TRI_sr_index_t)); if (!start) { return false; } @@ -254,7 +263,7 @@ static bool IncreaseDocumentsStorageSelectResult (TRI_select_result_t* result, assert(newSize > result->_documents._bytesAllocated); - start = (TRI_sr_documents_t*) realloc(result->_documents._start, newSize); + start = (TRI_sr_documents_t*) TRI_Reallocate(result->_documents._start, newSize); if (!start) { return false; } @@ -300,12 +309,24 @@ static size_t GetJoinDocumentSize (const TRI_select_join_t* join) { part = (TRI_join_part_t*) join->_parts._buffer[i]; if (part->_type == JOIN_TYPE_LIST) { n = part->_listDocuments._length; + + // adjust for extra data + total += part->_extraData._size * n; } else { n = 1; } + + // number of documents total += sizeof(TRI_select_size_t); + // document pointers total += (size_t) (sizeof(TRI_sr_documents_t) * n); + + // adjust for extra data + if (part->_extraData._size) { + total += sizeof(TRI_select_size_t); + total += part->_extraData._size; + } } return total; @@ -362,13 +383,41 @@ bool TRI_AddJoinSelectResult (TRI_select_result_t* result, TRI_select_join_t* jo *docPtr++ = (TRI_sr_documents_t) document->_data; } + + if (part->_extraData._size) { + // copy extra data + assert(part->_listDocuments._length == part->_extraData._listValues._length); + numPtr = (TRI_select_size_t*) docPtr; + *numPtr++ = part->_listDocuments._length; + docPtr = (TRI_sr_documents_t*) numPtr; + + for (j = 0; j < part->_extraData._listValues._length; j++) { + memcpy(docPtr, part->_extraData._listValues._buffer[j], part->_extraData._size); + docPtr = (TRI_sr_documents_t*) ((uint8_t*) docPtr + part->_extraData._size); + } + } } else { // single document *numPtr++ = 1; docPtr = (TRI_sr_documents_t*) numPtr; document = (TRI_doc_mptr_t*) part->_singleDocument; - *docPtr++ = (TRI_sr_documents_t) document->_data; + if (document) { + *docPtr++ = (TRI_sr_documents_t) document->_data; + } + else { + // document is null + *docPtr++ = 0; + } + + if (part->_extraData._size) { + // copy extra data + numPtr = (TRI_select_size_t*) docPtr; + *numPtr++ = 1; + docPtr = (TRI_sr_documents_t*) numPtr; + memcpy(docPtr, part->_extraData._singleValue, part->_extraData._size); + docPtr = (TRI_sr_documents_t*) ((uint8_t*) docPtr + part->_extraData._size); + } } numPtr = (TRI_select_size_t*) docPtr; } diff --git a/VocBase/select-result.h b/VocBase/select-result.h index 7b04ebb660..cb9baab79f 100644 --- a/VocBase/select-result.h +++ b/VocBase/select-result.h @@ -55,8 +55,10 @@ extern "C" { //////////////////////////////////////////////////////////////////////////////// typedef enum { - RESULT_PART_SINGLE = 0, - RESULT_PART_MULTI = 1 + RESULT_PART_DOCUMENT_SINGLE = 0, + RESULT_PART_DOCUMENT_MULTI = 1, + RESULT_PART_VALUE_SINGLE = 2, + RESULT_PART_VALUE_MULTI = 3 } TRI_select_part_e; @@ -69,6 +71,7 @@ typedef struct TRI_select_datapart_s { char* _alias; TRI_doc_collection_t* _collection; TRI_select_part_e _type; + size_t _extraDataSize; void (*free) (struct TRI_select_datapart_s*); } @@ -80,7 +83,8 @@ TRI_select_datapart_t; TRI_select_datapart_t* TRI_CreateDataPart (const char*, const TRI_doc_collection_t*, - const TRI_select_part_e); + const TRI_select_part_e, + const size_t); //////////////////////////////////////////////////////////////////////////////// /// @brief document index within a select result diff --git a/VocBase/shadow-data.c b/VocBase/shadow-data.c new file mode 100644 index 0000000000..3fc42fcbf6 --- /dev/null +++ b/VocBase/shadow-data.c @@ -0,0 +1,240 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief shadow data storage +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2011-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +/// @author Copyright 2012, triagens GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +#include "shadow-data.h" + +// ----------------------------------------------------------------------------- +// --SECTION-- SHADOW DATA +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief hashs an element +//////////////////////////////////////////////////////////////////////////////// + +static uint64_t HashElement (TRI_associative_pointer_t* array, void const* e) { + TRI_shadow_t const* element = e; + + return element->_did; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief tests if two elements are equal +//////////////////////////////////////////////////////////////////////////////// + +static bool EqualElement (TRI_associative_pointer_t* array, void const* l, void const* r) { + TRI_shadow_t const* left = l; + TRI_shadow_t const* right = r; + + return left->_cid == right->_cid && left->_did == right->_did; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief initialisases a shadow data storage +//////////////////////////////////////////////////////////////////////////////// + +void TRI_InitShadowDataStore (TRI_shadow_store_t* store, + void* (*create) (TRI_shadow_store_t*, TRI_doc_collection_t*, TRI_doc_mptr_t const*), + bool (*verify) (TRI_shadow_store_t*, TRI_doc_collection_t*, TRI_doc_mptr_t const*, void*), + void (*destroy) (TRI_shadow_store_t*, TRI_shadow_t*)) { + + TRI_InitAssociativePointer(&store->_index, + NULL, + HashElement, + NULL, + EqualElement); + + store->createShadow = create; + store->verifyShadow = verify; + store->destroyShadow = destroy; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief destroys a shadow data storage, but does not free the pointer +//////////////////////////////////////////////////////////////////////////////// + +void TRI_DestroyShadowDataStore (TRI_shadow_store_t* store) { + TRI_DestroyAssociativePointer(&store->_index); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public methods +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief looks up or create shadow data +//////////////////////////////////////////////////////////////////////////////// + +TRI_shadow_t* TRI_FindShadowData (TRI_shadow_store_t* store, TRI_vocbase_t* vocbase, TRI_voc_cid_t cid, TRI_voc_did_t did) { + union { TRI_shadow_t* s; TRI_shadow_t const* c; } cnv; + TRI_vocbase_col_t const* col; + TRI_doc_collection_t* collection; + TRI_doc_mptr_t const* mptr; + TRI_shadow_t search; + TRI_shadow_t* shadow; + void* element; + bool ok; + + // extract the collection + col = TRI_LookupCollectionByIdVocBase(vocbase, cid); + + if (col == NULL) { + return NULL; + } + + collection = col->_collection; + + // lock the collection + collection->beginRead(collection); + + // find the document + mptr = collection->read(collection, did); + + if (mptr == NULL) { + collection->endRead(collection); + return NULL; + } + + // check if we already know a parsed version + TRI_LockMutex(&store->_lock); + + search._cid = cid; + search._did = did; + cnv.c = TRI_LookupByElementAssociativePointer(&store->_index, &search); + shadow = cnv.s; + + if (shadow != NULL) { + ok = store->verifyShadow(store, collection, mptr, shadow->_data); + + if (ok) { + ++shadow->_rc; + + TRI_UnlockMutex(&store->_lock); + collection->endRead(collection); + + return shadow; + } + else { + TRI_ReleaseShadowData(store, shadow); + } + } + + // parse the document + element = store->createShadow(store, collection, mptr); + + if (element == NULL) { + TRI_UnlockMutex(&store->_lock); + collection->endRead(collection); + return NULL; + } + + // enter the element into the store + shadow = TRI_Allocate(sizeof(TRI_shadow_t)); + + if (shadow == NULL) { + TRI_UnlockMutex(&store->_lock); + collection->endRead(collection); + + return NULL; + } + + shadow->_rc = 1; + shadow->_cid = cid; + shadow->_did = did; + shadow->_rid = mptr->_rid; + shadow->_data = element; + + TRI_InsertElementAssociativePointer(&store->_index, shadow, true); + + // use element, unlock the store and the collection + ++shadow->_rc; + + TRI_UnlockMutex(&store->_lock); + collection->endRead(collection); + + // and return the element + return shadow; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief releases shadow data +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ReleaseShadowData (TRI_shadow_store_t* store, TRI_shadow_t* shadow) { + TRI_LockMutex(&store->_lock); + + // release the element + --shadow->_rc; + + // need to destroy the element + if (shadow->_rc < 1) { + TRI_RemoveElementAssociativePointer(&store->_index, shadow); + store->destroyShadow(store, shadow); + TRI_Free(shadow); + } + + TRI_UnlockMutex(&store->_lock); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)" +// End: diff --git a/RestHandler/RestDocumentHandler.h b/VocBase/shadow-data.h similarity index 59% rename from RestHandler/RestDocumentHandler.h rename to VocBase/shadow-data.h index 20abf3acdc..1ea5e5d1c2 100644 --- a/RestHandler/RestDocumentHandler.h +++ b/VocBase/shadow-data.h @@ -1,11 +1,11 @@ //////////////////////////////////////////////////////////////////////////////// -/// @brief document request handler +/// @brief shadow data storage /// /// @file /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2011-2012 triagens 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. @@ -22,138 +22,122 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2010-2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2012, triagens GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// -#ifndef TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_DOCUMENT_HANDLER_H -#define TRIAGENS_AVOCADO_DB_REST_HANDLER_REST_DOCUMENT_HANDLER_H 1 +#ifndef TRIAGENS_DURHAM_VOC_BASE_SHADOW_DATA_H +#define TRIAGENS_DURHAM_VOC_BASE_SHADOW_DATA_H 1 -#include "RestHandler/RestVocbaseBaseHandler.h" +#include "BasicsC/common.h" -//////////////////////////////////////////////////////////////////////////////// -/// @page RestDocumentTOC -/// -///
      -///
    1. @ref RestDocumentCreate "POST /_document"
    2. -///
    3. @ref RestDocumentRead "GET /_document"
    4. -///
    5. @ref RestDocumentUpdate "PUT /_document"
    6. -///
    7. @ref RestDocumentDelete "DELETE /_document"
    8. -///
    -//////////////////////////////////////////////////////////////////////////////// +#include "BasicsC/locks.h" +#include "BasicsC/associative.h" +#include "VocBase/document-collection.h" -//////////////////////////////////////////////////////////////////////////////// -/// @page RestDocument REST Interface for Documents -/// -/// The basic operations (create, read, update, delete) for documents are mapped -/// to the standard HTTP methods (POST, GET, PUT, DELETE). An identifier for the -/// revision is returned in the "ETag" field. If you modify a document, you can -/// use the "ETag" field to detect conflicts. -/// -///
    -/// @copydoc RestDocumentTOC -///
    -/// -/// @anchor RestDocumentCreate -/// @copydetails triagens::avocado::RestDocumentHandler::createDocument -/// -/// @anchor RestDocumentRead -/// @copydetails triagens::avocado::RestDocumentHandler::readDocument -/// -/// @anchor RestDocumentUpdate -/// @copydetails triagens::avocado::RestDocumentHandler::updateDocument -/// -/// @anchor RestDocumentDelete -/// @copydetails triagens::avocado::RestDocumentHandler::deleteDocument -//////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +extern "C" { +#endif // ----------------------------------------------------------------------------- -// --SECTION-- RestDocumentHandler +// --SECTION-- public types // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// -/// @addtogroup AvocadoDB +/// @addtogroup VocBase /// @{ //////////////////////////////////////////////////////////////////////////////// -namespace triagens { - namespace avocado { - //////////////////////////////////////////////////////////////////////////////// -/// @brief document request handler +/// @brief shadow data //////////////////////////////////////////////////////////////////////////////// - class RestDocumentHandler : public RestVocbaseBaseHandler { +typedef struct TRI_shadow_s { + int64_t _rc; + + TRI_voc_cid_t _cid; + TRI_voc_did_t _did; + TRI_voc_rid_t _rid; + + void* _data; +} +TRI_shadow_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief shadow data storage +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_shadow_store_s { + TRI_mutex_t _lock; + + TRI_associative_pointer_t _index; + + void* (*createShadow) (struct TRI_shadow_store_s*, struct TRI_doc_collection_s*, struct TRI_doc_mptr_s const*); + bool (*verifyShadow) (struct TRI_shadow_store_s*, struct TRI_doc_collection_s*, struct TRI_doc_mptr_s const*, void*); + void (*destroyShadow) (struct TRI_shadow_store_s*, TRI_shadow_t*); +} +TRI_shadow_store_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// // ----------------------------------------------------------------------------- // --SECTION-- constructors and destructors // ----------------------------------------------------------------------------- - public: - //////////////////////////////////////////////////////////////////////////////// -/// @brief constructor -//////////////////////////////////////////////////////////////////////////////// - - RestDocumentHandler (rest::HttpRequest* request, struct TRI_vocbase_s* vocbase); - -// ----------------------------------------------------------------------------- -// --SECTION-- Handler methods -// ----------------------------------------------------------------------------- - - public: - -//////////////////////////////////////////////////////////////////////////////// -/// {@inheritDoc} -//////////////////////////////////////////////////////////////////////////////// - - status_e execute (); - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// --SECTION-- private methods -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @addtogroup AvocadoDB +/// @addtogroup VocBase /// @{ //////////////////////////////////////////////////////////////////////////////// - private: - //////////////////////////////////////////////////////////////////////////////// -/// @brief creates a document +/// @brief initialisases a shadow data storage //////////////////////////////////////////////////////////////////////////////// - bool createDocument (); +void TRI_InitShadowDataStore (TRI_shadow_store_t* store, + void* (*create) (TRI_shadow_store_t*, TRI_doc_collection_t*, TRI_doc_mptr_t const*), + bool (*verify) (TRI_shadow_store_t*, TRI_doc_collection_t*, TRI_doc_mptr_t const*, void*), + void (*destory) (TRI_shadow_store_t*, TRI_shadow_t*)); //////////////////////////////////////////////////////////////////////////////// -/// @brief reads a document +/// @brief destroys a shadow data storage, but does not free the pointer //////////////////////////////////////////////////////////////////////////////// - bool readDocument (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief updates a document -//////////////////////////////////////////////////////////////////////////////// - - bool updateDocument (); - -//////////////////////////////////////////////////////////////////////////////// -/// @brief deletes a document -//////////////////////////////////////////////////////////////////////////////// - - bool deleteDocument (); - }; - } -} +void TRI_DestroyShadowDataStore (TRI_shadow_store_t* store); //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- +// --SECTION-- public methods +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup VocBase +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief looks up or create shadow data +//////////////////////////////////////////////////////////////////////////////// + +TRI_shadow_t* TRI_FindShadowData (TRI_shadow_store_t* store, TRI_vocbase_t* vocbase, TRI_voc_cid_t cid, TRI_voc_did_t did); + +//////////////////////////////////////////////////////////////////////////////// +/// @brief releases shadow data +//////////////////////////////////////////////////////////////////////////////// + +void TRI_ReleaseShadowData (TRI_shadow_store_t* store, TRI_shadow_t* shadow); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + #endif // Local Variables: diff --git a/VocBase/simple-collection.c b/VocBase/simple-collection.c index 3585d02c2a..b83394f0ff 100644 --- a/VocBase/simple-collection.c +++ b/VocBase/simple-collection.c @@ -27,17 +27,14 @@ #include "simple-collection.h" -#include -#include -#include -#include -#include - -#include -#include -#include - +#include "BasicsC/conversions.h" +#include "BasicsC/files.h" +#include "BasicsC/hashes.h" +#include "BasicsC/logging.h" +#include "BasicsC/strings.h" #include "ShapedJson/shape-accessor.h" +#include "VocBase/index.h" +#include "VocBase/voc-shaper.h" // ----------------------------------------------------------------------------- // --SECTION-- forward declarations @@ -61,6 +58,16 @@ static TRI_index_t* CreateGeoIndexSimCollection (TRI_sim_collection_t* collectio bool geoJson, TRI_idx_iid_t iid); +static TRI_index_t* CreateHashIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + TRI_idx_iid_t iid, + bool unique); + +static TRI_index_t* CreateSkiplistIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + TRI_idx_iid_t iid, + bool unique); + static uint64_t HashKeyHeader (TRI_associative_pointer_t* array, void const* key); static uint64_t HashElementDocument (TRI_associative_pointer_t* array, void const* element); @@ -278,6 +285,7 @@ static TRI_doc_mptr_t* CreateDocument (TRI_sim_collection_t* collection, TRI_voc_size_t bodySize, TRI_df_marker_t** result, void const* additional) { + TRI_datafile_t* journal; TRI_doc_mptr_t* header; TRI_voc_size_t total; @@ -1116,11 +1124,17 @@ static void OpenIndex (char const* filename, void* data) { TRI_json_t* loc; TRI_json_t* lon; TRI_json_t* type; + TRI_json_t* fieldCount; + TRI_json_t* fieldStr; + TRI_vector_t attributes; TRI_sim_collection_t* doc; bool geoJson; char const* typeStr; char* error; - + char* fieldChar; + int intCount; + bool ok; + bool uniqueIndex; json = TRI_JsonFile(filename, &error); if (json == NULL) { @@ -1145,7 +1159,9 @@ static void OpenIndex (char const* filename, void* data) { typeStr = type->_value._string.data; doc = (TRI_sim_collection_t*) data; + // ........................................................................... // geo index + // ........................................................................... if (TRI_EqualString(typeStr, "geo")) { loc = TRI_LookupArrayJson(json, "location"); lat = TRI_LookupArrayJson(json, "latitude"); @@ -1154,7 +1170,7 @@ static void OpenIndex (char const* filename, void* data) { gjs = TRI_LookupArrayJson(json, "geoJson"); iid = 0; geoJson = false; - + if (iis != NULL && iis->_type == TRI_JSON_NUMBER) { iid = iis->_value._number; } @@ -1174,6 +1190,205 @@ static void OpenIndex (char const* filename, void* data) { } } + + // ........................................................................... + // Hash Index + // ........................................................................... + else if (TRI_EqualString(typeStr, "hash")) { + + // ......................................................................... + // Initialise the ok value + // ......................................................................... + ok = true; + + + // ......................................................................... + // Initialise the vector in which we store the fields on which the hashing + // will be based. + // ......................................................................... + TRI_InitVector(&attributes, sizeof(char*)); + + + // ......................................................................... + // Determine the id of the hash index + // ......................................................................... + if (ok) { + iis = TRI_LookupArrayJson(json, "iid"); + iid = 0; + if (iis != NULL && iis->_type == TRI_JSON_NUMBER) { + iid = iis->_value._number; + } + else { + LOG_WARNING("ignore hash-index, id could not be located"); + ok = false; + } + } + + // ......................................................................... + // Determine if the hash index is unique or non-unique + // ......................................................................... + if (ok) { + gjs = TRI_LookupArrayJson(json, "unique"); + uniqueIndex = false; + if (gjs != NULL && gjs->_type == TRI_JSON_BOOLEAN) { + uniqueIndex = gjs->_value._boolean; + } + else { + LOG_WARNING("ignore hash-index, could not determine if unique or non-unique"); + ok = false; + } + } + + + // ......................................................................... + // Extract the list of fields + // ......................................................................... + if (ok) { + fieldCount = 0; + fieldCount = TRI_LookupArrayJson(json, "field_count"); + intCount = 0; + if ( (fieldCount != NULL) && (fieldCount->_type == TRI_JSON_NUMBER) ) { + intCount = fieldCount->_value._number; + } + if (intCount < 1) { + LOG_WARNING("ignore hash-index, field count missing"); + ok = false; + } + } + + if (ok) { + fieldChar = TRI_Allocate(30); + if (fieldChar == NULL) { + LOG_WARNING("ignore hash-index, field count missing"); + ok = false; + } + } + + if (ok) { + for (int j = 0; j < intCount; ++j) { + sprintf(fieldChar,"field_%i",j); + fieldStr = TRI_LookupArrayJson(json, fieldChar); + if (fieldStr->_type != TRI_JSON_STRING) { + LOG_WARNING("ignore hash-index, invalid field name for hash index"); + ok = false; + break; + } + TRI_PushBackVector(&attributes, &(fieldStr->_value._string.data)); + } + TRI_Free(fieldChar); + } + + + if (ok) { + CreateHashIndexSimCollection (doc, &attributes, iid, uniqueIndex); + } + + // ......................................................................... + // Free the vector + // ......................................................................... + TRI_DestroyVector(&attributes); + } + + + + // ........................................................................... + // Skiplist Index + // ........................................................................... + else if (TRI_EqualString(typeStr, "skiplist")) { + + // ......................................................................... + // Initialise the ok value + // ......................................................................... + ok = true; + + + // ......................................................................... + // Initialise the vector in which we store the fields on which the hashing + // will be based. + // ......................................................................... + TRI_InitVector(&attributes, sizeof(char*)); + + + // ......................................................................... + // Determine the id of the hash index + // ......................................................................... + if (ok) { + iis = TRI_LookupArrayJson(json, "iid"); + iid = 0; + if (iis != NULL && iis->_type == TRI_JSON_NUMBER) { + iid = iis->_value._number; + } + else { + LOG_WARNING("ignore skiplist-index, id could not be located"); + ok = false; + } + } + + // ......................................................................... + // Determine if the skiplist index is unique or non-unique + // ......................................................................... + if (ok) { + gjs = TRI_LookupArrayJson(json, "unique"); + uniqueIndex = false; + if (gjs != NULL && gjs->_type == TRI_JSON_BOOLEAN) { + uniqueIndex = gjs->_value._boolean; + } + else { + LOG_WARNING("ignore skiplist-index, could not determine if unique or non-unique"); + ok = false; + } + } + + + // ......................................................................... + // Extract the list of fields + // ......................................................................... + if (ok) { + fieldCount = 0; + fieldCount = TRI_LookupArrayJson(json, "field_count"); + intCount = 0; + if ( (fieldCount != NULL) && (fieldCount->_type == TRI_JSON_NUMBER) ) { + intCount = fieldCount->_value._number; + } + if (intCount < 1) { + LOG_WARNING("ignore skiplist-index, field count missing"); + ok = false; + } + } + + if (ok) { + fieldChar = TRI_Allocate(30); + if (fieldChar == NULL) { + LOG_WARNING("ignore skiplist-index, field count missing"); + ok = false; + } + } + + if (ok) { + for (int j = 0; j < intCount; ++j) { + sprintf(fieldChar,"field_%i",j); + fieldStr = TRI_LookupArrayJson(json, fieldChar); + if (fieldStr->_type != TRI_JSON_STRING) { + LOG_WARNING("ignore skiplist-index, invalid field name for skiplist index"); + ok = false; + break; + } + TRI_PushBackVector(&attributes, &(fieldStr->_value._string.data)); + } + TRI_Free(fieldChar); + } + + + if (ok) { + CreateSkiplistIndexSimCollection (doc, &attributes, iid, uniqueIndex); + } + + // ......................................................................... + // Free the vector + // ......................................................................... + TRI_DestroyVector(&attributes); + } + // ups else { LOG_WARNING("ignoring unknown index type '%s'", typeStr); @@ -1182,7 +1397,8 @@ static void OpenIndex (char const* filename, void* data) { TRI_FreeJson(json); } -//////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// /// @brief hashes an edge header //////////////////////////////////////////////////////////////////////////////// @@ -1305,6 +1521,11 @@ TRI_sim_collection_t* TRI_CreateSimCollection (char const* path, TRI_col_paramet // first create the document collection doc = TRI_Allocate(sizeof(TRI_sim_collection_t)); + if (!doc) { + LOG_ERROR("cannot create document"); + return NULL; + } + collection = TRI_CreateCollection(&doc->base.base, path, &info); if (collection == NULL) { @@ -1406,6 +1627,10 @@ TRI_sim_collection_t* TRI_OpenSimCollection (char const* path) { // first open the document collection doc = TRI_Allocate(sizeof(TRI_sim_collection_t)); + if (!doc) { + return NULL; + } + collection = TRI_OpenCollection(&doc->base.base, path); if (collection == NULL) { @@ -1417,6 +1642,13 @@ TRI_sim_collection_t* TRI_OpenSimCollection (char const* path) { // then the shape collection shapes = TRI_Concatenate2File(collection->_directory, "SHAPES"); + if (!shapes) { + TRI_CloseCollection(collection); + TRI_FreeCollection(collection); + TRI_Free(doc); + return NULL; + } + shaper = TRI_OpenVocShaper(shapes); TRI_FreeString(shapes); @@ -1529,6 +1761,10 @@ static bool CreateImmediateIndexes (TRI_sim_collection_t* collection, // IN entry = TRI_Allocate(sizeof(TRI_edge_header_t)); + if (!entry) { + // TODO: what to do in this case? + return false; + } entry->_mptr = header; entry->_direction = TRI_EDGE_IN; entry->_cid = edge->_toCid; @@ -1537,6 +1773,10 @@ static bool CreateImmediateIndexes (TRI_sim_collection_t* collection, // OUT entry = TRI_Allocate(sizeof(TRI_edge_header_t)); + if (!entry) { + // TODO: what to do in this case? + return false; + } entry->_mptr = header; entry->_direction = TRI_EDGE_OUT; entry->_cid = edge->_fromCid; @@ -1545,6 +1785,10 @@ static bool CreateImmediateIndexes (TRI_sim_collection_t* collection, // ANY entry = TRI_Allocate(sizeof(TRI_edge_header_t)); + if (!entry) { + // TODO: what to do in this case? + return false; + } entry->_mptr = header; entry->_direction = TRI_EDGE_ANY; entry->_cid = edge->_toCid; @@ -1553,6 +1797,10 @@ static bool CreateImmediateIndexes (TRI_sim_collection_t* collection, if (edge->_toCid != edge->_fromCid || edge->_toDid != edge->_fromDid) { entry = TRI_Allocate(sizeof(TRI_edge_header_t)); + if (!entry) { + // TODO: what to do in this case? + return false; + } entry->_mptr = header; entry->_direction = TRI_EDGE_ANY; entry->_cid = edge->_fromCid; @@ -1572,6 +1820,7 @@ static bool CreateImmediateIndexes (TRI_sim_collection_t* collection, ok = idx->insert(idx, header); + // i < n ? idx : NULL; if (! ok) { result = false; } @@ -1744,7 +1993,7 @@ static void FillIndex (TRI_sim_collection_t* collection, size_t scanned; void** end; void** ptr; - + bool ok; // update index n = collection->_primaryIndex._nrUsed; ptr = collection->_primaryIndex._table; @@ -1756,7 +2005,7 @@ static void FillIndex (TRI_sim_collection_t* collection, if (*ptr) { ++scanned; - idx->insert(idx, *ptr); + ok = idx->insert(idx, *ptr); if (scanned % 10000 == 0) { LOG_INFO("indexed %ld of %ld documents", scanned, n); @@ -1788,6 +2037,9 @@ TRI_vector_pointer_t* TRI_IndexesSimCollection (TRI_sim_collection_t* collection size_t i; vector = TRI_Allocate(sizeof(TRI_vector_pointer_t)); + if (!vector) { + return NULL; + } TRI_InitVectorPointer(vector); // ............................................................................. @@ -1821,7 +2073,7 @@ TRI_vector_pointer_t* TRI_IndexesSimCollection (TRI_sim_collection_t* collection } //////////////////////////////////////////////////////////////////////////////// -/// @brief returns a description of all indexes +/// @brief returns a description of anindex //////////////////////////////////////////////////////////////////////////////// TRI_index_t* TRI_IndexSimCollection (TRI_sim_collection_t* collection, TRI_idx_iid_t iid) { @@ -1839,7 +2091,7 @@ TRI_index_t* TRI_IndexSimCollection (TRI_sim_collection_t* collection, TRI_idx_i for (i = 0; i < n; ++i) { idx = collection->_indexes._buffer[i]; - + if (idx->_iid == iid) { break; } @@ -1865,6 +2117,10 @@ bool TRI_DropIndexSimCollection (TRI_sim_collection_t* collection, TRI_idx_iid_t size_t i; vector = TRI_Allocate(sizeof(TRI_vector_pointer_t)); + if (!vector) { + return false; + } + found = NULL; TRI_InitVectorPointer(vector); @@ -2102,6 +2358,157 @@ static TRI_index_t* CreateGeoIndexSimCollection (TRI_sim_collection_t* collectio return idx; } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds a hash index to the collection +//////////////////////////////////////////////////////////////////////////////// + +static TRI_index_t* CreateHashIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + TRI_idx_iid_t iid, + bool unique) { + TRI_index_t* idx = NULL; + TRI_shaper_t* shaper = collection->base._shaper; + TRI_vector_t shapes; + + TRI_InitVector(&shapes, sizeof(TRI_shape_pid_t)); + + + // ........................................................................... + // Determine the shape ids for the attributes + // ........................................................................... + for (size_t j = 0; j < attributes->_length; ++j) { + char* shapeString = *((char**)(TRI_AtVector(attributes,j))); + TRI_shape_pid_t shape = shaper->findAttributePathByName(shaper, shapeString); + TRI_PushBackVector(&shapes,&shape); + } + + + // ........................................................................... + // Attempt to find an existing index which matches the attributes above. + // If a suitable index is found, return that one otherwise we need to create + // a new one. + // ........................................................................... + idx = TRI_LookupHashIndexSimCollection(collection, &shapes); + + + if (idx != NULL) { + TRI_DestroyVector(&shapes); + LOG_TRACE("hash-index already created"); + return idx; + } + + + // ........................................................................... + // Create the hash index + // ........................................................................... + idx = TRI_CreateHashIndex(&collection->base,&shapes, unique); + + + // ........................................................................... + // If index id given, use it otherwise use the default. + // ........................................................................... + if (iid) { + idx->_iid = iid; + } + + + // ........................................................................... + // initialises the index with all existing documents + // ........................................................................... + FillIndex(collection, idx); + + + // ........................................................................... + // store index + // ........................................................................... + TRI_PushBackVectorPointer(&collection->_indexes, idx); + + + // ........................................................................... + // release memory allocated to vector + // ........................................................................... + TRI_DestroyVector(&shapes); + + return idx; +} + + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds a skiplist index to the collection +//////////////////////////////////////////////////////////////////////////////// + +static TRI_index_t* CreateSkiplistIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + TRI_idx_iid_t iid, + bool unique) { + TRI_index_t* idx = NULL; + TRI_shaper_t* shaper = collection->base._shaper; + TRI_vector_t shapes; + + TRI_InitVector(&shapes, sizeof(TRI_shape_pid_t)); + + + // ........................................................................... + // Determine the shape ids for the attributes + // ........................................................................... + for (size_t j = 0; j < attributes->_length; ++j) { + char* shapeString = *((char**)(TRI_AtVector(attributes,j))); + TRI_shape_pid_t shape = shaper->findAttributePathByName(shaper, shapeString); + TRI_PushBackVector(&shapes,&shape); + } + + + // ........................................................................... + // Attempt to find an existing index which matches the attributes above. + // If a suitable index is found, return that one otherwise we need to create + // a new one. + // ........................................................................... + idx = TRI_LookupSkiplistIndexSimCollection(collection, &shapes); + + + if (idx != NULL) { + TRI_DestroyVector(&shapes); + LOG_TRACE("skiplist-index already created"); + return idx; + } + + + // ........................................................................... + // Create the skiplist index + // ........................................................................... + idx = TRI_CreateSkiplistIndex(&collection->base,&shapes, unique); + + + // ........................................................................... + // If index id given, use it otherwise use the default. + // ........................................................................... + if (iid) { + idx->_iid = iid; + } + + + // ........................................................................... + // initialises the index with all existing documents + // ........................................................................... + FillIndex(collection, idx); + + + // ........................................................................... + // store index + // ........................................................................... + TRI_PushBackVectorPointer(&collection->_indexes, idx); + + + // ........................................................................... + // release memory allocated to vector + // ........................................................................... + TRI_DestroyVector(&shapes); + + return idx; +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// @@ -2173,6 +2580,142 @@ TRI_index_t* TRI_LookupGeoIndex2SimCollection (TRI_sim_collection_t* collection, return NULL; } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds a hash index (unique or non-unique) +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_LookupHashIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* shapes) { + TRI_index_t* matchedIndex = NULL; + + // ........................................................................... + // Note: This function does NOT differentiate between non-unique and unique + // hash indexes. The first hash index which matches the attributes + // (shapes parameter) will be returned. + // ........................................................................... + + + // ........................................................................... + // go through every index and see if we have a match + // ........................................................................... + + for (size_t j = 0; j < collection->_indexes._length; ++j) { + TRI_index_t* idx = collection->_indexes._buffer[j]; + TRI_hash_index_t* hashIndex = (TRI_hash_index_t*) idx; + bool found = true; + + + // ......................................................................... + // check that the type of the index is in fact a hash index + // ......................................................................... + + if (idx->_type != TRI_IDX_TYPE_HASH_INDEX) { + continue; + } + + + // ......................................................................... + // check that the number of shapes (fields) in the hash index matches that + // of the number of attributes + // ......................................................................... + + if (shapes->_length != hashIndex->_shapeList->_length) { + continue; + } + + + // ......................................................................... + // Go through all the attributes and see if they match + // ......................................................................... + + for (size_t k = 0; k < shapes->_length; ++k) { + TRI_shape_pid_t field = *((TRI_shape_pid_t*)(TRI_AtVector(hashIndex->_shapeList,k))); + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(shapes,k))); + if (field != shape) { + found = false; + break; + } + } + + + if (found) { + matchedIndex = idx; + break; + } + } + + return matchedIndex; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds a skiplist index (unique or non-unique) +//////////////////////////////////////////////////////////////////////////////// + +TRI_index_t* TRI_LookupSkiplistIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* shapes) { + TRI_index_t* matchedIndex = NULL; + + // ........................................................................... + // Note: This function does NOT differentiate between non-unique and unique + // skiplist indexes. The first index which matches the attributes + // (shapes parameter) will be returned. + // ........................................................................... + + + // ........................................................................... + // go through every index and see if we have a match + // ........................................................................... + + for (size_t j = 0; j < collection->_indexes._length; ++j) { + TRI_index_t* idx = collection->_indexes._buffer[j]; + TRI_skiplist_index_t* skiplistIndex = (TRI_skiplist_index_t*) idx; + bool found = true; + + + // ......................................................................... + // check that the type of the index is in fact a skiplist index + // ......................................................................... + + if (idx->_type != TRI_IDX_TYPE_SKIPLIST_INDEX) { + continue; + } + + + // ......................................................................... + // check that the number of shapes (fields) in the index matches that + // of the number of attributes + // ......................................................................... + + if (shapes->_length != skiplistIndex->_shapeList->_length) { + continue; + } + + + // ......................................................................... + // Go through all the attributes and see if they match + // ......................................................................... + + for (size_t k = 0; k < shapes->_length; ++k) { + TRI_shape_pid_t field = *((TRI_shape_pid_t*)(TRI_AtVector(skiplistIndex->_shapeList,k))); + TRI_shape_pid_t shape = *((TRI_shape_pid_t*)(TRI_AtVector(shapes,k))); + if (field != shape) { + found = false; + break; + } + } + + + if (found) { + matchedIndex = idx; + break; + } + } + + return matchedIndex; +} + //////////////////////////////////////////////////////////////////////////////// /// @brief ensures that a geo index exists //////////////////////////////////////////////////////////////////////////////// @@ -2241,6 +2784,97 @@ TRI_idx_iid_t TRI_EnsureGeoIndex2SimCollection (TRI_sim_collection_t* collection return ok ? idx->_iid : 0; } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ensures that a hash index exists +//////////////////////////////////////////////////////////////////////////////// + +TRI_idx_iid_t TRI_EnsureHashIndexSimCollection(TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + bool unique) { + TRI_index_t* idx; + bool ok; + + // ............................................................................. + // within write-lock the collection + // ............................................................................. + TRI_WriteLockReadWriteLock(&collection->_lock); + + + // ............................................................................. + // Given the list of attributes (as strings) + // ............................................................................. + + idx = CreateHashIndexSimCollection(collection, attributes, 0, unique); + + if (idx == NULL) { + TRI_WriteUnlockReadWriteLock(&collection->_lock); + return 0; + } + + TRI_WriteUnlockReadWriteLock(&collection->_lock); + + // ............................................................................. + // without write-lock + // ............................................................................. + + ok = TRI_SaveIndex(&collection->base, idx); + + if (ok) { + } + else { + assert(0); + } + + return ok ? idx->_iid : 0; +} + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief ensures that a skiplist index exists +//////////////////////////////////////////////////////////////////////////////// + +TRI_idx_iid_t TRI_EnsureSkiplistIndexSimCollection(TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + bool unique) { + TRI_index_t* idx; + bool ok; + + // ............................................................................. + // within write-lock the collection + // ............................................................................. + TRI_WriteLockReadWriteLock(&collection->_lock); + + + // ............................................................................. + // Given the list of attributes (as strings) + // ............................................................................. + + idx = CreateSkiplistIndexSimCollection(collection, attributes, 0, unique); + + if (idx == NULL) { + TRI_WriteUnlockReadWriteLock(&collection->_lock); + return 0; + } + + TRI_WriteUnlockReadWriteLock(&collection->_lock); + + // ............................................................................. + // without write-lock + // ............................................................................. + + ok = TRI_SaveIndex(&collection->base, idx); + + if (ok) { + } + else { + assert(0); + } + + return ok ? idx->_iid : 0; +} + + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/VocBase/simple-collection.h b/VocBase/simple-collection.h index 280713a206..d0af2deaef 100644 --- a/VocBase/simple-collection.h +++ b/VocBase/simple-collection.h @@ -211,7 +211,7 @@ bool TRI_CloseSimCollection (TRI_sim_collection_t* collection); TRI_vector_pointer_t* TRI_IndexesSimCollection (TRI_sim_collection_t*); //////////////////////////////////////////////////////////////////////////////// -/// @brief returns a description of all indexes +/// @brief returns a description of an index //////////////////////////////////////////////////////////////////////////////// TRI_index_t* TRI_IndexSimCollection (TRI_sim_collection_t*, TRI_idx_iid_t); @@ -285,6 +285,23 @@ struct TRI_index_s* TRI_LookupGeoIndex2SimCollection (TRI_sim_collection_t* coll TRI_shape_pid_t latitude, TRI_shape_pid_t longitude); +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds a hash index +/// +/// Note that the caller must hold at least a read-lock. +//////////////////////////////////////////////////////////////////////////////// + +struct TRI_index_s* TRI_LookupHashIndexSimCollection (TRI_sim_collection_t*, const TRI_vector_t*); + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief finds a skiplist index +/// +/// Note that the caller must hold at least a read-lock. +//////////////////////////////////////////////////////////////////////////////// + +struct TRI_index_s* TRI_LookupSkiplistIndexSimCollection (TRI_sim_collection_t*, const TRI_vector_t*); + //////////////////////////////////////////////////////////////////////////////// /// @brief ensures that a geo index exists //////////////////////////////////////////////////////////////////////////////// @@ -300,6 +317,25 @@ TRI_idx_iid_t TRI_EnsureGeoIndexSimCollection (TRI_sim_collection_t* collection, TRI_idx_iid_t TRI_EnsureGeoIndex2SimCollection (TRI_sim_collection_t* collection, char const* latitude, char const* longitude); + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds or returns an existing hash index to a collection +//////////////////////////////////////////////////////////////////////////////// + +TRI_idx_iid_t TRI_EnsureHashIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + bool unique); + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief adds or returns an existing hash index to a collection +//////////////////////////////////////////////////////////////////////////////// + +TRI_idx_iid_t TRI_EnsureSkiplistIndexSimCollection (TRI_sim_collection_t* collection, + const TRI_vector_t* attributes, + bool unique); + //////////////////////////////////////////////////////////////////////////////// /// @} diff --git a/VocBase/vocbase.c b/VocBase/vocbase.c index f952a156a0..d4025a1dcb 100644 --- a/VocBase/vocbase.c +++ b/VocBase/vocbase.c @@ -262,6 +262,9 @@ static void ScanPath (TRI_vocbase_t* vocbase, char const* path) { } file = TRI_Concatenate2File(path, name); + if (!file) { + continue; + } if (TRI_IsDirectory(file)) { TRI_col_info_t info; @@ -280,7 +283,7 @@ static void ScanPath (TRI_vocbase_t* vocbase, char const* path) { LOG_DEBUG("added simple document collection from '%s'", file); } else { - LOG_DEBUG("skiping collection of unknown type %d", (int) type); + LOG_DEBUG("skipping collection of unknown type %d", (int) type); } } } @@ -290,6 +293,8 @@ static void ScanPath (TRI_vocbase_t* vocbase, char const* path) { TRI_FreeString(file); } + + TRI_DestroyVectorString(&files); } //////////////////////////////////////////////////////////////////////////////// @@ -414,7 +419,17 @@ TRI_vocbase_t* TRI_OpenVocBase (char const* path) { // setup vocbase structure vocbase = TRI_Allocate(sizeof(TRI_vocbase_t)); + if (!vocbase) { + LOG_ERROR("out of memory when opening vocbase"); + return NULL; + } + vocbase->_path = TRI_DuplicateString(path); + if (!vocbase->_path) { + TRI_Free(vocbase); + LOG_ERROR("out of memory when opening vocbase"); + return NULL; + } TRI_InitReadWriteLock(&vocbase->_lock); diff --git a/VocBase/vocbase.h b/VocBase/vocbase.h index c798d4c3dd..38231f1fe4 100644 --- a/VocBase/vocbase.h +++ b/VocBase/vocbase.h @@ -87,6 +87,9 @@ extern size_t PageSize; /// /// If you add a new error code, you must also add the description in /// @ref TRI_InitialiseVocBase. +/// +/// Please note that the error numbers defined here must not conflict with error +/// numbers defined for other parts of the program (e.g. in VocBase/vocbase.h) //////////////////////////////////////////////////////////////////////////////// enum { diff --git a/VocBase/where.h b/VocBase/where.h index cab65ce8ac..e31b28c7b2 100644 --- a/VocBase/where.h +++ b/VocBase/where.h @@ -50,6 +50,8 @@ extern "C" { typedef enum { TRI_QRY_WHERE_BOOLEAN, TRI_QRY_WHERE_GENERAL, + TRI_QRY_WHERE_HASH_CONSTANT, + TRI_QRY_WHERE_SKIPLIST_CONSTANT, TRI_QRY_WHERE_WITHIN_CONSTANT, TRI_QRY_WHERE_PRIMARY_CONSTANT } @@ -147,6 +149,30 @@ typedef struct TRI_qry_where_within_const_s { } TRI_qry_where_within_const_t; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief hash index where +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_qry_where_hash_const_s { + TRI_qry_where_t base; + TRI_idx_iid_t _iid; + TRI_json_t* _parameters; // a json list object +} +TRI_qry_where_hash_const_t; + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief skiplist index where +//////////////////////////////////////////////////////////////////////////////// + +typedef struct TRI_qry_where_skiplist_const_s { + TRI_qry_where_t base; + TRI_idx_iid_t _iid; + TRI_json_t* _parameters; // a json list object +} +TRI_qry_where_skiplist_const_t; + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/config/bison-c++.sh b/config/bison-c++.sh index 796510ab0e..172c777b26 100755 --- a/config/bison-c++.sh +++ b/config/bison-c++.sh @@ -32,11 +32,15 @@ test -f ${PREFIX}.cpp || exit 1 DIR=`dirname ${OUTPUT}` -cp ${DIR}/position.hh ${DIR}/position.hh.tmp +mv ${DIR}/position.hh ${DIR}/position.hh.tmp sed -e 's/\(pos1.filename && pos2.filename && .pos1.filename == .pos2.filename\)/(&)/g' \ ${DIR}/position.hh.tmp > ${DIR}/position.hh +# give some information +diff -u ${DIR}/position.hh.tmp ${DIR}/position.hh + +# cleanup rm -f ${DIR}/position.hh.tmp diff --git a/config/js2c.sh b/config/js2c.sh index fbc81f8dae..b0b9b145bf 100755 --- a/config/js2c.sh +++ b/config/js2c.sh @@ -1,5 +1,5 @@ #!/bin/bash -NAME=`echo $1 | sed -e 's:^\(.*/\)*js/\(.*\)\.js$:\2:' | tr "/" "_"` +NAME=`echo $1 | sed -e 's:^\(.*/\)*js/\(.*\)\.js$:\2:' | tr "/-" "__"` cat $1 \ | sed -e 's:\(["\]\):\\\1:g' \ diff --git a/configure b/configure index ba4afa0ce2..4f9928ef73 100755 --- a/configure +++ b/configure @@ -656,6 +656,8 @@ ENABLE_LOGGER_TIMING_FALSE ENABLE_LOGGER_TIMING_TRUE ENABLE_LOGGER_FALSE ENABLE_LOGGER_TRUE +ENABLE_FORCE_32BIT_FALSE +ENABLE_FORCE_32BIT_TRUE ENABLE_32BIT_FALSE ENABLE_32BIT_TRUE ENABLE_64BIT_FALSE @@ -725,6 +727,8 @@ build_os build_vendor build_cpu build +ENABLE_INSTALL_DBDIR_FALSE +ENABLE_INSTALL_DBDIR_TRUE ENABLE_RELATIVE_FALSE ENABLE_RELATIVE_TRUE ENABLE_ALL_IN_ONE_FALSE @@ -778,6 +782,7 @@ enable_bison enable_flex enable_all_in_one enable_relative +enable_install_dbdir enable_silent_rules enable_dependency_tracking enable_error_on_warning @@ -1448,6 +1453,7 @@ Optional Features: --enable-flex enable FLEX --enable-all-in-one enable supplied V8, BOOST, LIBEV --enable-relative all path are relative to the binary + --enable-install-dbdir install an empty database directory --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build @@ -2595,6 +2601,24 @@ else fi +# Check whether --enable-install-dbdir was given. +if test "${enable_install_dbdir+set}" = set; then : + enableval=$enable_install_dbdir; tr_RELATIVE="${enableval:-yes}" +else + tr_RELATIVE=yes + +fi + + + if test "x$tr_DBDIR" = xyes; then + ENABLE_INSTALL_DBDIR_TRUE= + ENABLE_INSTALL_DBDIR_FALSE='#' +else + ENABLE_INSTALL_DBDIR_TRUE='#' + ENABLE_INSTALL_DBDIR_FALSE= +fi + + @@ -5275,8 +5299,21 @@ if test x$GCC == xyes; then WALL="${WALL} -Werror" fi + if test x$tr_DARWIN == xyes; then + WALL="${WALL} -Wno-deprecated-declarations" + fi + WALLC="${WALL} -Wshadow -Wstrict-prototypes -Wdeclaration-after-statement" - WALLCXX="${WALL} -Wstrict-null-sentinel -Woverloaded-virtual -Wno-variadic-macros" + WALLCXX="${WALL} -Woverloaded-virtual -Wno-variadic-macros" + + case $CXX in + *clang++*) + ;; + + *) + WALLCXX="${WALLCXX} -Wstrict-null-sentinel" + ;; + esac if test x$tr_WEFFCXX == xyes; then WALLCXX="${WALLCXX} -Weffc++" @@ -5521,6 +5558,7 @@ fi tr_BITS=32 +tr_BITS_32=no case $target_cpu in x86_64*) @@ -5531,16 +5569,14 @@ esac if test "x$tr_BITS" == "x64"; then # Check whether --enable-32bit was given. if test "${enable_32bit+set}" = set; then : - enableval=$enable_32bit; tr_32BIT="$enableval" - - if test "x$enableval" = xyes; then + enableval=$enable_32bit; if test "x$enableval" = xyes; then CXXFLAGS="$CXXFLAGS -m32" CFLAGS="$CFLAGS -m32" LDFLAGS="$LDFLAGS -m32" - fi -else - tr_32BIT="no" + tr_BITS=32 + tr_BITS_32=yes + fi fi fi @@ -5561,16 +5597,20 @@ else ENABLE_32BIT_FALSE= fi - - -if test "x$tr_BITS" == "x64"; then - if test "x$tr_32BIT" = xyes; then - BASIC_INFO="$BASIC_INFO|32bit: enabled" - else - BASIC_INFO="$BASIC_INFO|64bit: enabled" - fi + if test "x$tr_BITS_32" = xyes; then + ENABLE_FORCE_32BIT_TRUE= + ENABLE_FORCE_32BIT_FALSE='#' else + ENABLE_FORCE_32BIT_TRUE='#' + ENABLE_FORCE_32BIT_FALSE= +fi + + + +if test "x$tr_32BIT" = xyes; then BASIC_INFO="$BASIC_INFO|32bit: enabled" +else + BASIC_INFO="$BASIC_INFO|64bit: enabled" fi @@ -8205,7 +8245,12 @@ FLAG_INFO="$FLAG_INFO|." LIBEV_CPPFLAGS="-I${srcdir}/3rdParty/libev" LIBEV_LDFLAGS="" -LIBEV_LIBS="${srcdir}/3rdParty/libev/.libs/libev.a" + +if test "x$tr_BITS" = x64; then + LIBEV_LIBS="${srcdir}/3rdParty/libev/ARCH.x64/.libs/libev.a" +else + LIBEV_LIBS="${srcdir}/3rdParty/libev/ARCH.ia32/.libs/libev.a" +fi TRI_LIBEV_VERSION="4.11" @@ -8240,7 +8285,11 @@ V8_CPPFLAGS="-I${srcdir}/3rdParty/V8/include" V8_LDFLAGS="" if test "x$tr_DARWIN" == xyes; then - V8_LIBS="${srcdir}/3rdParty/V8/libv8.a" + if test "x$tr_BITS" == x64; then + V8_LIBS="${srcdir}/3rdParty/V8/libv8_x64.a" + else + V8_LIBS="${srcdir}/3rdParty/V8/libv8_ia32.a" + fi else if test "x$tr_BITS" == x64; then V8_LIBS="${srcdir}/3rdParty/V8/out/x64.release/obj.target/tools/gyp/libv8_base.a ${srcdir}/3rdParty/V8/out/x64.release/obj.target/tools/gyp/libv8_nosnapshot.a" @@ -9261,6 +9310,10 @@ if test -z "${ENABLE_RELATIVE_TRUE}" && test -z "${ENABLE_RELATIVE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_RELATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_INSTALL_DBDIR_TRUE}" && test -z "${ENABLE_INSTALL_DBDIR_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_INSTALL_DBDIR\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_DARWIN_TRUE}" && test -z "${ENABLE_DARWIN_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -9297,6 +9350,10 @@ if test -z "${ENABLE_32BIT_TRUE}" && test -z "${ENABLE_32BIT_FALSE}"; then as_fn_error $? "conditional \"ENABLE_32BIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_FORCE_32BIT_TRUE}" && test -z "${ENABLE_FORCE_32BIT_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_FORCE_32BIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_LOGGER_TRUE}" && test -z "${ENABLE_LOGGER_FALSE}"; then as_fn_error $? "conditional \"ENABLE_LOGGER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 5ed798471e..d4d93476e3 100644 --- a/configure.ac +++ b/configure.ac @@ -55,6 +55,14 @@ fi AM_CONDITIONAL(ENABLE_RELATIVE, test "x$tr_RELATIVE" = xyes) +AC_ARG_ENABLE(install-dbdir, + AS_HELP_STRING([--enable-install-dbdir], [install an empty database directory]), + [tr_RELATIVE="${enableval:-yes}"], + [tr_RELATIVE=yes] +) + +AM_CONDITIONAL(ENABLE_INSTALL_DBDIR, test "x$tr_DBDIR" = xyes) + dnl ============================================================================ dnl CHECKS HOST, PROGRAMS, COMPILER, LIB, SYSTEM dnl ============================================================================ diff --git a/js/actions/api.js b/js/actions/api.js new file mode 100644 index 0000000000..7201dd079b --- /dev/null +++ b/js/actions/api.js @@ -0,0 +1,120 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns an error +/// +/// @FUN{actionResultError(@FA{req}, @FA{res}, @FA{httpReturnCode}, @FA{errorNum}, @FA{errorMessage}, @FA{headers})} +/// +/// The functions returns an error json object. The returned object is an array +/// with an attribute @LIT{errorMessage} containing the error message +/// @FA{errorMessage}. +//////////////////////////////////////////////////////////////////////////////// + +function actionResultError (req, res, httpReturnCode, errorNum, errorMessage, headers) { + res.responseCode = httpReturnCode; + res.contentType = "application/json"; + + var result = { + "error" : true, + "code" : httpReturnCode, + "errorNum" : errorNum, + "errorMessage" : errorMessage + } + + res.body = JSON.stringify(result); + + if (headers != undefined) { + res.headers = headers; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns an error for unsupported methods +/// +/// @FUN{actionResultUnsupported(@FA{req}, @FA{res}, @FA{headers})} +/// +/// The functions returns an error json object. The returned object is an array +/// with an attribute @LIT{errorMessage} containing the error message +/// @FA{errorMessage}. +//////////////////////////////////////////////////////////////////////////////// + +function actionResultUnsupported (req, res, headers) { + actionResultError(req, res, 405, 405, "Unsupported method", headers); +} + + + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns a result +/// +/// @FUN{actionResultOK(@FA{req}, @FA{res}, @FA{httpReturnCode}, @FA{result}, @FA{headers}})} +/// +//////////////////////////////////////////////////////////////////////////////// + +function actionResultOK (req, res, httpReturnCode, result, headers) { + res.responseCode = httpReturnCode; + res.contentType = "application/json"; + + // add some default attributes to result: + result.error = false; + result.code = httpReturnCode; + + res.body = JSON.stringify(result); + + if (headers != undefined) { + res.headers = headers; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief error codes +//////////////////////////////////////////////////////////////////////////////// + +var queryNotFound = 10404; +var queryNotModified = 10304; + +var collectionNotFound = 20404; +var documentNotFound = 30404; +var documentNotModified = 30304; + +var cursorNotFound = 40404; +var cursorNotModified = 40304; + +var myApiRequests = {}; + +myApiRequests.cursor = { + "POST /_api/cursor" : "create and execute query. (creates a cursor)", + "PUT /_api/cursor/" : "get next results", + "DELETE /_api/cursor/" : "delete cursor" +} + +myApiRequests.collection = { + "GET /_api/collections" : "get list of collections", + "GET /_api/collection/" : "get all elements of collection" +} + +myApiRequests.document = { + "POST /_api/document/" : "create new document", + "PUT /_api/document//" : "update document", + "GET /_api/document//" : "get a document", + "DELETE /_api/document//" : "delete a document" +} + +myApiRequests.query = { + "POST /_api/query" : "create a query", + "GET /_api/query/" : "get query", + "PUT /_api/query/" : "change query", + "DELETE /_api/query/" : "delete query" +} + +defineAction("help", + function (req, res) { + var result = { + "requests":myApiRequests + } + + actionResultOK(req, res, 200, result); + }, + { + parameters : { + } + } +); diff --git a/js/actions/collection.js b/js/actions/collection.js new file mode 100644 index 0000000000..78c850f31b --- /dev/null +++ b/js/actions/collection.js @@ -0,0 +1,42 @@ +function getCollection(req, res) { + if (req._suffix.length != 1) { + actionResultError (req, res, 404, collectionNotFound, "Collection not found"); + return; + } + + var collection = decodeURIComponent(req._suffix[0]); + + try { + var coll = db[collection]; + + var result = { + "_id" : coll._id, + name : coll._name, + status : coll.status(), + figures : coll.figures() + }; + + actionResultOK(req, res, 200, result); + } + catch (e) { + actionResultError (req, res, 404, collectionNotFound, "Collection not found") + } +} + +defineAction("_api/collection", + function (req, res) { + + switch (req._requestType) { + case ("GET") : + getCollection(req, res); + break; + default: + actionResultUnsupported(req, res); + } + + }, + { + parameters : { + } + } +); diff --git a/js/actions/collections.js b/js/actions/collections.js new file mode 100644 index 0000000000..5c9dfc8dbb --- /dev/null +++ b/js/actions/collections.js @@ -0,0 +1,72 @@ +function getCollections(req, res) { + var colls; + var coll; + var result; + + + colls = db._collections(); + + var skip = 0; + var end = colls.length; + + if (req._parameters != undefined) { + if (req._parameters["skip"] != undefined) { + skip = parseInt(req._parameters["skip"]); + if (skip < 0) { + skip = 0; + } + } + + if (req._parameters["limit"] != undefined) { + var limit = parseInt(req._parameters["limit"]); + if (limit < 0) { + end = colls.length; + } + else { + end = Math.min(colls.length, skip + limit) + } + } + } + + var count = 0; + if (skip < end) { + count = end - skip; + } + + result = { + path : db._path, + total : colls.length, + count : count, + collections : {} + }; + + for (var i = skip; i < end; ++i) { + coll = colls[i]; + result.collections[coll._name] = { + _id : coll._id, + name : coll._name, + status : coll.status(), + figures : coll.figures() + }; + } + + actionResultOK(req, res, 200, result); +} + +defineAction("_api/collections", + function (req, res) { + + switch (req._requestType) { + case ("GET") : + getCollections(req, res); + break; + default: + actionResultError (req, res, 405, 405, "Unsupported method"); + } + + }, + { + parameters : { + } + } +); diff --git a/js/actions/cursor.js b/js/actions/cursor.js new file mode 100644 index 0000000000..dc40b6d6dd --- /dev/null +++ b/js/actions/cursor.js @@ -0,0 +1,136 @@ + +function postCursor(req, res) { + if (req._suffix.length != 0) { + actionResultError (req, res, 404, cursorNotModified, "Cursor not created"); + return; + } + + try { + var json = JSON.parse(req._requestBody); + var queryString; + + if (json.qid != undefined) { + var q = db.query.document_wrapped(json.qid); + queryString = q.query; + } + else if (json.query != undefined) { + queryString = json.query; + } + + if (queryString == undefined) { + actionResultError (req, res, 404, cursorNotModified, "Missing query identifier"); + return; + } + + var result = AQL_PREPARE(db, queryString); + if (result instanceof AvocadoQueryError) { + actionResultError (req, res, 404, result.code, result.message); + return; + } + + queryLimit = 0; + var cursor = result.execute(); + + var lines = []; + var i = 0; + + while (cursor.hasNext()) { + lines[i] = cursor.next(); + ++i; + } + + // req.bindParameter + // req.skip + // req.count + // query.execute(...) + + var hasMore = false; + var cursorId = null; + + if (queryString == "select a from achim a") { + hasMore = true; + cursorId = "egal:egal"; + } + + var result = { + "result" : lines, + "_id" : cursorId, + "count" : i, + "hasMore" : hasMore + }; + + actionResultOK(req, res, 201, result); + } + catch (e) { + actionResultError (req, res, 404, cursorNotModified, "Cursor not created"); + } +} + +function putCursor(req, res) { + if (req._suffix.length != 1) { + actionResultError (req, res, 404, cursorNotFound, "Cursor not found"); + return; + } + + try { + var cursorId = decodeURIComponent(req._suffix[0]); + + // TODO + + var result = { + "result" : [{"test":"protest"}, {"hello":"world"}], + "count" : 2, + "_id" : cursorId, + "hasMore" : false + }; + + actionResultOK(req, res, 200, result); + } + catch (e) { + actionResultError (req, res, 404, cursorNotFound, "Cursor not found"); + } +} + +function deleteCursor(req, res) { + if (req._suffix.length != 1) { + actionResultError (req, res, 404, cursorNotFound, "Cursor not found"); + return; + } + + try { + var cid = decodeURIComponent(req._suffix[0]); + if(db.cursor.delete(qid)) { + actionResultOK(req, res, 202, {"cid" : cid}); + } + else { + actionResultError (req, res, 404, cursorNotFound, "Cursor not found"); + } + } + catch (e) { + actionResultError (req, res, 404, cursorNotFound, "Cursor not found"); + } +} + +defineAction("_api/cursor", + function (req, res) { + + switch (req._requestType) { + case ("POST") : + postCursor(req, res); + break; + case ("PUT") : + putCursor(req, res); + break; + case ("DELETE") : + deleteCursor(req, res); + break; + default: + actionResultUnsupported(req, res); + } + + }, + { + parameters : { + } + } +); diff --git a/js/actions/document.js b/js/actions/document.js new file mode 100644 index 0000000000..e22f20b33f --- /dev/null +++ b/js/actions/document.js @@ -0,0 +1,124 @@ +function getDocument(req, res) { + if (req._suffix.length != 2) { + actionResultError (req, res, 404, documentNotFound, "Document not found"); + return; + } + + try { + var collection = decodeURIComponent(req._suffix[0]); + var documentId = decodeURIComponent(req._suffix[1]); + var result = { + "document" : {} + }; + + + result.document = db[collection].document(documentId); + actionResultOK(req, res, 200, result); + } + catch (e) { + actionResultError (req, res, 404, documentNotFound, "Document not found: " + e); + } +} + +function deleteDocument(req, res) { + if (req._suffix.length != 2) { + actionResultError (req, res, 404, documentNotFound, "Document not found"); + return; + } + + try { + var collection = decodeURIComponent(req._suffix[0]); + var documentId = decodeURIComponent(req._suffix[1]); + + var result = {}; + + + if (db[collection].delete(documentId)) { + result = { + "deleted" : true, + "_id" : documentId + }; + actionResultOK(req, res, 200, result); + } + else { + actionResultError (req, res, 304, documentNotModified, "Document not deleted"); + } + } + catch (e) { + actionResultError(req, res, 304, documentNotModified, "Document not deleted: " + e); + } +} + +function postDocument(req, res) { + if (req._suffix.length != 1) { + actionResultError (req, res, 404, collectionNotFound, "Collection not found"); + return; + } + + try { + var collection = decodeURIComponent(req._suffix[0]); + var json = JSON.parse(req._requestBody); + var id = db[collection].save(json); + + var result = { + "created" : true, + "_id" : id + }; + + actionResultOK(req, res, 201, result); + } + catch (e) { + actionResultError (req, res, 404, documentNotModified, "Document not saved: " + e); + } +} + +function putDocument(req, res) { + if (req._suffix.length != 2) { + actionResultError (req, res, 404, documentNotFound, "Document not found"); + return; + } + + try { + var collection = decodeURIComponent(req._suffix[0]); + var documentId = decodeURIComponent(req._suffix[1]); + var json = JSON.parse(req._requestBody); + var id = db[collection].replace(documentId, json); + + var result = { + "updated" : true, + "_id" : id + }; + + actionResultOK(req, res, 202, result); + } + catch (e) { + actionResultError (req, res, 404, documentNotModified, "Document not changed: " + e); + } +} + +defineAction("_api/document", + function (req, res) { + + switch (req._requestType) { + case ("GET") : + getDocument(req, res); + break; + case ("POST") : + postDocument(req, res); + break; + case ("PUT") : + putDocument(req, res); + break; + case ("DELETE") : + deleteDocument(req, res); + break; + default: + actionResultUnsupported(req, res); + } + + }, + { + parameters : { + } + } +); diff --git a/js/actions/documents.js b/js/actions/documents.js new file mode 100644 index 0000000000..6eb138b5ac --- /dev/null +++ b/js/actions/documents.js @@ -0,0 +1,52 @@ +function getDocuments(req, res) { + if (req._suffix.length != 1) { + actionResultError (req, res, 404, collectionNotFound, "Collection not found"); + return; + } + + var collection = decodeURIComponent(req._suffix[0]); + var skip = null; + var limit = null; + + if (req.skip != undefined) { + skip = parseInt(req.skip); + if (skip < 0) { + skip = 0; + } + } + + if (req.limit != undefined) { + limit = parseInt(req.limit); + if (limit < 0) { + limit = 0; + } + } + + try { + var result = db[collection].ALL(skip, limit); + actionResultOK(req, res, 200, result); + } + catch (e) { + actionResultError (req, res, 404, collectionNotFound, "Collection not found") + } +} + +defineAction("_api/documents", + function (req, res) { + + switch (req._requestType) { + case ("GET") : + getDocuments(req, res); + break; + default: + actionResultUnsupported(req, res); + } + + }, + { + parameters : { + skip : "number", + limit : "number" + } + } +); diff --git a/js/bootstrap/js-modules.h b/js/bootstrap/js-modules.h index 74ead96617..2ce8cc5c10 100644 --- a/js/bootstrap/js-modules.h +++ b/js/bootstrap/js-modules.h @@ -257,6 +257,8 @@ static string JS_bootstrap_modules = "///
  • @ref JSModuleInternalLoad \"internal.load\"
  • \n" "///
  • @ref JSModuleInternalLogLevel \"internal.log\"
  • \n" "///
  • @ref JSModuleInternalLogLevel \"internal.logLevel\"
  • \n" + "///
  • @ref JSModuleInternalOutput \"internal.output\"
  • \n" + "///
  • @ref JSModuleInternalProcessStat \"internal.processStat\"
  • \n" "///
  • @ref JSModuleInternalRead \"internal.read\"
  • \n" "///
  • @ref JSModuleInternalSPrintF \"internal.sprintf\"
  • \n" "///
  • @ref JSModuleInternalTime \"internal.time\"
  • \n" @@ -284,6 +286,9 @@ static string JS_bootstrap_modules = "/// @anchor JSModuleInternalLogLevel\n" "/// @copydetails JS_LogLevel\n" "///\n" + "/// @anchor JSModuleInternalOutput\n" + "/// @copydetails JS_Output\n" + "///\n" "/// @anchor JSModuleInternalRead\n" "/// @copydetails JS_Read\n" "///\n" @@ -309,6 +314,7 @@ static string JS_bootstrap_modules = "ModuleCache[\"/internal\"].exports.log = SYS_LOG;\n" "ModuleCache[\"/internal\"].exports.logLevel = SYS_LOG_LEVEL;\n" "ModuleCache[\"/internal\"].exports.output = SYS_OUTPUT;\n" + "ModuleCache[\"/internal\"].exports.processStat = SYS_PROCESS_STAT;\n" "ModuleCache[\"/internal\"].exports.read = SYS_READ;\n" "ModuleCache[\"/internal\"].exports.sprintf = SYS_SPRINTF;\n" "ModuleCache[\"/internal\"].exports.time = SYS_TIME;\n" diff --git a/js/bootstrap/js-print.h b/js/bootstrap/js-print.h index ca22b1f825..87abcfd9d7 100644 --- a/js/bootstrap/js-print.h +++ b/js/bootstrap/js-print.h @@ -45,7 +45,7 @@ static string JS_bootstrap_print = "/// Only available in shell mode.\n" "///\n" "/// Prints the arguments. If an argument is an object having a\n" - "/// function @FN{PRINT}, then this function is called. Otherwise @FN{toJson} is\n" + "/// function @FN{_PRINT}, then this function is called. Otherwise @FN{toJson} is\n" "/// used. A final newline is printed\n" "///\n" "/// @verbinclude fluent40\n" @@ -57,12 +57,48 @@ static string JS_bootstrap_print = " internal.output(\" \");\n" " }\n" "\n" - " PRINT(arguments[i], [], \"~\", []);\n" + " if (typeof(arguments[i]) === \"string\") {\n" + " internal.output(arguments[i]); \n" + " } \n" + " else {\n" + " PRINT(arguments[i], [], \"~\", []);\n" + " }\n" " }\n" "\n" " internal.output(\"\\n\");\n" "}\n" "\n" + "var characterQuoteCache = {\n" + " '\\b': '\\\\b', // ASCII 8, Backspace\n" + " '\\t': '\\\\t', // ASCII 9, Tab\n" + " '\\n': '\\\\n', // ASCII 10, Newline\n" + " '\\f': '\\\\f', // ASCII 12, Formfeed\n" + " '\\r': '\\\\r', // ASCII 13, Carriage Return\n" + " '\\\"': '\\\\\"',\n" + " '\\\\': '\\\\\\\\'\n" + "};\n" + "\n" + "function QuoteSingleJSONCharacter(c) {\n" + " if (c in characterQuoteCache) {\n" + " return characterQuoteCache[c];\n" + " }\n" + " var charCode = c.charCodeAt(0);\n" + " var result;\n" + " if (charCode < 16) result = '\\\\u000';\n" + " else if (charCode < 256) result = '\\\\u00';\n" + " else if (charCode < 4096) result = '\\\\u0';\n" + " else result = '\\\\u';\n" + " result += charCode.toString(16);\n" + " characterQuoteCache[c] = result;\n" + " return result;\n" + "}\n" + "\n" + "function QuoteJSONString(str) {\n" + " var quotable = /[\\\\\\\"\\x00-\\x1f]/g;\n" + " return '\"' + str.replace(quotable, QuoteSingleJSONCharacter) + '\"';\n" + "}\n" + "\n" + "\n" "////////////////////////////////////////////////////////////////////////////////\n" "/// @brief prints objects to standard output without a new-line\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -87,8 +123,8 @@ static string JS_bootstrap_print = " }\n" "\n" " if (value instanceof Object) {\n" - " if ('PRINT' in value) {\n" - " value.PRINT(seen, path, names);\n" + " if ('_PRINT' in value) {\n" + " value._PRINT(seen, path, names);\n" " }\n" " else if (value.__proto__ === Object.prototype) {\n" " PRINT_OBJECT(value, seen, path, names);\n" @@ -104,7 +140,12 @@ static string JS_bootstrap_print = " internal.output(\"undefined\");\n" " }\n" " else {\n" - " internal.output(\"\" + value);\n" + " if (typeof(value) === \"string\") {\n" + " internal.output(QuoteJSONString(value));\n" + " } \n" + " else {\n" + " internal.output(\"\" + value); \n" + " }\n" " }\n" " }\n" "}\n" @@ -126,7 +167,7 @@ static string JS_bootstrap_print = "/// @brief JSON representation of an array\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" - "Array.prototype.PRINT = function(seen, path, names) {\n" + "Array.prototype._PRINT = function(seen, path, names) {\n" " if (this.length == 0) {\n" " internal.output(\"[ ]\");\n" " }\n" @@ -162,7 +203,7 @@ static string JS_bootstrap_print = "/// @brief prints a function\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" - "Function.prototype.PRINT = function() {\n" + "Function.prototype._PRINT = function() {\n" " internal.output(this.toString());\n" "}\n" "\n" @@ -192,7 +233,7 @@ static string JS_bootstrap_print = " if (object.hasOwnProperty(k)) {\n" " var val = object[k];\n" "\n" - " internal.output(sep, k, \" : \");\n" + " internal.output(sep, QuoteJSONString(k), \" : \");\n" " PRINT(val, seen, path + \"[\" + k + \"]\", names);\n" " sep = \", \";\n" " }\n" diff --git a/js/bootstrap/modules.js b/js/bootstrap/modules.js index 93bbb92b1c..753b99800e 100644 --- a/js/bootstrap/modules.js +++ b/js/bootstrap/modules.js @@ -256,6 +256,8 @@ fs = ModuleCache["/fs"].exports; ///
  • @ref JSModuleInternalLoad "internal.load"
  • ///
  • @ref JSModuleInternalLogLevel "internal.log"
  • ///
  • @ref JSModuleInternalLogLevel "internal.logLevel"
  • +///
  • @ref JSModuleInternalOutput "internal.output"
  • +///
  • @ref JSModuleInternalProcessStat "internal.processStat"
  • ///
  • @ref JSModuleInternalRead "internal.read"
  • ///
  • @ref JSModuleInternalSPrintF "internal.sprintf"
  • ///
  • @ref JSModuleInternalTime "internal.time"
  • @@ -283,6 +285,9 @@ fs = ModuleCache["/fs"].exports; /// @anchor JSModuleInternalLogLevel /// @copydetails JS_LogLevel /// +/// @anchor JSModuleInternalOutput +/// @copydetails JS_Output +/// /// @anchor JSModuleInternalRead /// @copydetails JS_Read /// @@ -308,6 +313,7 @@ ModuleCache["/internal"].exports.load = SYS_LOAD; ModuleCache["/internal"].exports.log = SYS_LOG; ModuleCache["/internal"].exports.logLevel = SYS_LOG_LEVEL; ModuleCache["/internal"].exports.output = SYS_OUTPUT; +ModuleCache["/internal"].exports.processStat = SYS_PROCESS_STAT; ModuleCache["/internal"].exports.read = SYS_READ; ModuleCache["/internal"].exports.sprintf = SYS_SPRINTF; ModuleCache["/internal"].exports.time = SYS_TIME; diff --git a/js/bootstrap/print.js b/js/bootstrap/print.js index b6e24696f8..a53779c856 100644 --- a/js/bootstrap/print.js +++ b/js/bootstrap/print.js @@ -44,7 +44,7 @@ var internal = require("internal"); /// Only available in shell mode. /// /// Prints the arguments. If an argument is an object having a -/// function @FN{PRINT}, then this function is called. Otherwise @FN{toJson} is +/// function @FN{_PRINT}, then this function is called. Otherwise @FN{toJson} is /// used. A final newline is printed /// /// @verbinclude fluent40 @@ -56,12 +56,48 @@ function print () { internal.output(" "); } - PRINT(arguments[i], [], "~", []); + if (typeof(arguments[i]) === "string") { + internal.output(arguments[i]); + } + else { + PRINT(arguments[i], [], "~", []); + } } internal.output("\n"); } +var characterQuoteCache = { + '\b': '\\b', // ASCII 8, Backspace + '\t': '\\t', // ASCII 9, Tab + '\n': '\\n', // ASCII 10, Newline + '\f': '\\f', // ASCII 12, Formfeed + '\r': '\\r', // ASCII 13, Carriage Return + '\"': '\\"', + '\\': '\\\\' +}; + +function QuoteSingleJSONCharacter(c) { + if (c in characterQuoteCache) { + return characterQuoteCache[c]; + } + var charCode = c.charCodeAt(0); + var result; + if (charCode < 16) result = '\\u000'; + else if (charCode < 256) result = '\\u00'; + else if (charCode < 4096) result = '\\u0'; + else result = '\\u'; + result += charCode.toString(16); + characterQuoteCache[c] = result; + return result; +} + +function QuoteJSONString(str) { + var quotable = /[\\\"\x00-\x1f]/g; + return '"' + str.replace(quotable, QuoteSingleJSONCharacter) + '"'; +} + + //////////////////////////////////////////////////////////////////////////////// /// @brief prints objects to standard output without a new-line //////////////////////////////////////////////////////////////////////////////// @@ -86,8 +122,8 @@ function PRINT (value, seen, path, names) { } if (value instanceof Object) { - if ('PRINT' in value) { - value.PRINT(seen, path, names); + if ('_PRINT' in value) { + value._PRINT(seen, path, names); } else if (value.__proto__ === Object.prototype) { PRINT_OBJECT(value, seen, path, names); @@ -103,7 +139,12 @@ function PRINT (value, seen, path, names) { internal.output("undefined"); } else { - internal.output("" + value); + if (typeof(value) === "string") { + internal.output(QuoteJSONString(value)); + } + else { + internal.output("" + value); + } } } } @@ -125,7 +166,7 @@ function PRINT (value, seen, path, names) { /// @brief JSON representation of an array //////////////////////////////////////////////////////////////////////////////// -Array.prototype.PRINT = function(seen, path, names) { +Array.prototype._PRINT = function(seen, path, names) { if (this.length == 0) { internal.output("[ ]"); } @@ -161,7 +202,7 @@ Array.prototype.PRINT = function(seen, path, names) { /// @brief prints a function //////////////////////////////////////////////////////////////////////////////// -Function.prototype.PRINT = function() { +Function.prototype._PRINT = function() { internal.output(this.toString()); } @@ -191,7 +232,7 @@ function PRINT_OBJECT (object, seen, path, names) { if (object.hasOwnProperty(k)) { var val = object[k]; - internal.output(sep, k, " : "); + internal.output(sep, QuoteJSONString(k), " : "); PRINT(val, seen, path + "[" + k + "]", names); sep = ", "; } diff --git a/js/modules/graph.js b/js/modules/graph.js index 1726c2db55..11f7ef5fbb 100644 --- a/js/modules/graph.js +++ b/js/modules/graph.js @@ -34,7 +34,7 @@ var AvocadoEdgesCollection = internal.AvocadoEdgesCollection; //////////////////////////////////////////////////////////////////////////////// /// @page Graphs First Steps with Graphs /// -/// Graphs consists of vertices and edges. The vertex collection contains the +/// A Graph consists of vertices and edges. The vertex collection contains the /// documents forming the vertices. The edge collection contains the documents /// forming the edges. Together both collections form a graph. Assume that /// the vertex collection is called @LIT{vertices} and the edges collection @@ -49,6 +49,10 @@ var AvocadoEdgesCollection = internal.AvocadoEdgesCollection; /// /// It is, however, impossible to use different vertices with the same /// edges. Edges are tied to the vertices. +/// +/// Next steps: learn more about +/// +/// - @ref JSModuleGraph //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// @@ -436,7 +440,7 @@ Edge.prototype.properties = function () { /// @brief edge printing //////////////////////////////////////////////////////////////////////////////// -Edge.prototype.PRINT = function (seen, path, names) { +Edge.prototype._PRINT = function (seen, path, names) { if (! this._id) { internal.output("[deleted Edge]"); } @@ -880,7 +884,7 @@ Vertex.prototype.setProperty = function (name, value) { /// @brief vertex representation //////////////////////////////////////////////////////////////////////////////// -Vertex.prototype.PRINT = function (seen, path, names) { +Vertex.prototype._PRINT = function (seen, path, names) { if (! this._id) { internal.output("[deleted Vertex]"); } @@ -1108,7 +1112,7 @@ Graph.prototype.getVertices = function () { return all.hasNext(); }; - this.PRINT = function(seen, path, names) { + this._PRINT = function(seen, path, names) { internal.output("[vertex iterator]"); } }; @@ -1151,7 +1155,7 @@ Graph.prototype.getEdges = function () { return all.hasNext(); }; - this.PRINT = function(seen, path, names) { + this._PRINT = function(seen, path, names) { internal.output("[edge iterator]"); } }; @@ -1249,7 +1253,7 @@ Graph.prototype.constructEdge = function(id) { /// @brief graph printing //////////////////////////////////////////////////////////////////////////////// -Graph.prototype.PRINT = function (seen, path, names) { +Graph.prototype._PRINT = function (seen, path, names) { internal.output("Graph(\"", this._vertices._name, "\", \"" + this._edges._name, "\")"); } diff --git a/js/modules/simple-query.js b/js/modules/simple-query.js new file mode 100644 index 0000000000..d2028a1f99 --- /dev/null +++ b/js/modules/simple-query.js @@ -0,0 +1,1482 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief Avocado Query Language +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +var internal = require("internal"); +var AvocadoCollection = internal.AvocadoCollection; +var AvocadoEdgesCollection = internal.AvocadoEdgesCollection; + +//////////////////////////////////////////////////////////////////////////////// +/// @page SimpleQueriesTOC +/// +///
      +///
    1. @ref Queries +///
        +///
      1. @ref SimpleQueryDocument "db.@FA{collection}.document(@FA{document-reference})"
      2. +///
      3. @ref SimpleQueryAll "db.@FA{collection}.all()"
      4. +///
      5. @ref SimpleQueryCount "@FA{query}.count()"
      6. +///
      +///
    2. +///
    3. @ref GeoQueries +///
        +///
      1. @ref SimpleQueryNear "db.@FA{collection}.near()"
      2. +///
      3. @ref SimpleQueryWithin "db.@FA{collection}.within()"
      4. +///
      5. @ref SimpleQueryGeo "db.@FA{collection}.geo()"
      6. +///
      +///
    4. +///
    5. @ref EdgesQueries +///
        +///
      1. @ref SimpleQueryEdges "edges.@FA{collection}.edges()"
      2. +///
      3. @ref SimpleQueryInEdges "edges.@FA{collection}.inEdges()"
      4. +///
      5. @ref SimpleQueryOutEdges "edges.@FA{collection}.outEdges()"
      6. +///
      +///
    6. +///
    7. @ref Pagination +///
        +///
      1. @ref SimpleQueryLimit "@FA{query}.limit(@FA{limit})"
      2. +///
      3. @ref SimpleQuerySkip "@FA{query}.skip(@FA{skip})"
      4. +///
      +///
    8. +///
    9. @ref SequentialAccess +///
        +///
      1. @ref SimpleQueryHasNext "@FA{query}.hasNext()"
      2. +///
      3. @ref SimpleQueryNext "@FA{query}.next()"
      4. +///
      5. @ref SimpleQueryNextRef "@FA{query}.nextRef()"
      6. +///
      +///
    10. +///
    +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @page SimpleQueries Simple Queries +/// +/// Simple queries can be used if the query condition is very simple, i. e., a +/// document reference, all documents, a query-by-example, or a simple geo +/// query. In a simple query you can specify exactly one collection and one +/// condition. The result can then be sorted and result can be split into pages. +/// +///
    +/// @copydoc SimpleQueriesTOC +///
    +/// +/// @section Queries Queries +//////////////////////////// +/// +/// @anchor SimpleQueryDocument +/// @copydetails JS_DocumentQuery +///
    +/// +/// @anchor SimpleQueryAll +/// @copydetails JSF_AvocadoCollection_prototype_all +///
    +/// +/// @anchor SimpleQueryCount +/// @copydetails JSF_SimpleQuery_prototype_count +/// +/// @section GeoQueries Geo Queries +/////////////////////////////////// +/// +/// The AvocadoDB allows to selects documents based on geographic +/// coordinates. In order for this to work, a geo-spatial index must be defined. +/// This index will use a very elaborate algorithm to lookup neighbours that is +/// a magnitude faster than a simple R* index. +/// +/// In general a geo coordinate is a pair of latitude and longitude. This can +/// either be an list with two elements like @CODE{[ -10\, +30 ]} (latitude +/// first, followed by longitude) or an object like @CODE{{ lon: -10\, lat: +30 +/// }}. In order to find all documents within a given radius around a +/// coordinate use the @FN{within} operator. In order to find all +/// documents near a given document use the @FN{near} operator. +/// +/// It is possible to define more than one geo-spatial index per collection. In +/// this case you must give a hint using the @FN{geo} operator which of indexes +/// should be used in a query. +/// +///
    +/// +/// @anchor SimpleQueryNear +/// @copydetails JSF_AvocadoCollection_prototype_near +///
    +/// +/// @anchor SimpleQueryWithin +/// @copydetails JSF_AvocadoCollection_prototype_within +///
    +/// +/// @anchor SimpleQueryGeo +/// @copydetails JSF_AvocadoCollection_prototype_geo +/// +/// @section EdgesQueries Edges Queries +/////////////////////////////////////// +/// +/// @anchor SimpleQueryEdges +/// @copydetails JS_EdgesQuery +///
    +/// +/// @anchor SimpleQueryInEdges +/// @copydetails JS_InEdgesQuery +///
    +/// +/// @anchor SimpleQueryOutEdges +/// @copydetails JS_OutEdgesQuery +/// +/// @section Pagination Pagination +////////////////////////////////// +/// +/// If, for example, you display the result of a user search, then you are in +/// general not interested in the completed result set, but only the first 10 or +/// so documents. Or maybe the next 10 documents for the second page. In this +/// case, you can the @FN{skip} and @FN{limit} operators. These operators works +/// like LIMIT in MySQL. +/// +/// @FN{skip} used together with @FN{limit} can be used to implement pagination. +/// The @FN{skip} operator skips over the first n documents. So, in order to +/// create result pages with 10 result documents per page, you can use +/// @CODE{skip(n * 10).limit(10)} to access the 10 documents on the n.th page. +/// This result should be sorted, so that the pagination works in a predicable +/// way. +/// +/// @anchor SimpleQueryLimit +/// @copydetails JSF_SimpleQuery_prototype_limit +///
    +/// +/// @anchor SimpleQuerySkip +/// @copydetails JSF_SimpleQuery_prototype_skip +/// +/// @section SequentialAccess Sequential Access +/// +/// @anchor SimpleQueryHasNext +/// @copydetails JSF_SimpleQuery_prototype_hasNext +///
    +/// +/// @anchor SimpleQueryNext +/// @copydetails JSF_SimpleQuery_prototype_next +///
    +/// +/// @anchor SimpleQueryNextRef +/// @copydetails JSF_SimpleQuery_prototype_nextRef +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- AVOCADO COLLECTION +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs an all query for a collection +/// +/// @FUN{all()} +/// +/// Selects all documents of a collection. You can use @FN{toArray}, @FN{next}, +/// @FN{nextRef}, or @FN{hasNext} to access the result. The result can be +/// limited using the @FN{skip} and @FN{limit} operator. +/// +/// @EXAMPLES +/// +/// Use @FN{toArray} to get all documents at once: +/// +/// @verbinclude simple3 +/// +/// Use @FN{next} to loop over all documents: +/// +/// @verbinclude simple4 +//////////////////////////////////////////////////////////////////////////////// + +AvocadoCollection.prototype.all = function () { + return new SimpleQueryAll(this); +} + +AvocadoEdgesCollection.prototype.all = AvocadoCollection.prototype.all; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs a near query for a collection +/// +/// @FUN{near(@FA{latitiude}, @FA{longitude})} +/// +/// The default will find at most 100 documents near the coordinate +/// (@FA{latitiude}, @FA{longitude}). The returned list is sorted according to +/// the distance, with the nearest document coming first. If there are near +/// documents of equal distance, documents are chosen randomly from this set +/// until the limit is reached. It is possible to change the limit using the +/// @FA{limit} operator. +/// +/// In order to use the @FN{near} operator, a geo index must be defined for the +/// collection. This index also defines which attribute holds the coordinates +/// for the document. If you have more then one geo-spatial index, you can use +/// the @FN{geo} operator to select a particular index. +/// +/// @FUN{near(@FA{latitiude}, @FA{longitude}).limit(@FA{limit})} +/// +/// Limits the result to @FA{limit} documents. Note that @FA{limit} can be more +/// than 100, this will raise the default limit. +/// +/// @FUN{near(@FA{latitiude}, @FA{longitude}).distance()} +/// +/// This will add an attribute @LIT{distance} to all documents returned, which +/// contains the distance between the given point and the document in meter. +/// +/// @FUN{near(@FA{latitiude}, @FA{longitude}).distance(@FA{name})} +/// +/// This will add an attribute @FA{name} to all documents returned, which +/// contains the distance between the given point and the document in meter. +/// +/// @EXAMPLES +/// +/// To get the nearst two locations: +/// +/// @verbinclude simple14 +/// +/// If you need the distance as well, then you can use: +/// +/// @verbinclude simple15 +//////////////////////////////////////////////////////////////////////////////// + +AvocadoCollection.prototype.near = function (lat, lon) { + return new SimpleQueryNear(this, lat, lon); +} + +AvocadoEdgesCollection.prototype.near = AvocadoCollection.prototype.near; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs a within query for a collection +/// +/// @FUN{within(@FA{latitiude}, @FA{longitude}, @FA{radius})} +/// +/// This will find all documents with in a given radius around the coordinate +/// (@FA{latitiude}, @FA{longitude}). The returned list is sorted by distance. +/// +/// In order to use the @FN{within} operator, a geo index must be defined for the +/// collection. This index also defines which attribute holds the coordinates +/// for the document. If you have more then one geo-spatial index, you can use +/// the @FN{geo} operator to select a particular index. +/// +/// @FUN{within(@FA{latitiude}, @FA{longitude}, @FA{radius}).distance()} +/// +/// This will add an attribute @LIT{_distance} to all documents returned, which +/// contains the distance between the given point and the document in meter. +/// +/// @FUN{within(@FA{latitiude}, @FA{longitude}, @FA{radius}).distance(@FA{name})} +/// +/// This will add an attribute @FA{name} to all documents returned, which +/// contains the distance between the given point and the document in meter. +/// +/// @EXAMPLES +/// +/// To find all documents within a radius of 2000 km use: +/// +/// @verbinclude simple17 +//////////////////////////////////////////////////////////////////////////////// + +AvocadoCollection.prototype.within = function (lat, lon, radius) { + return new SimpleQueryWithin(this, lat, lon, radius); +} + +AvocadoEdgesCollection.prototype.within = AvocadoCollection.prototype.within; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs a geo index selection +/// +/// @FUN{geo(@FA{location})} +/// +/// The next @FN{near} or @FN{within} operator will use the specific geo-spatial +/// index. +/// +/// @FUN{geo(@FA{location}, @LIT{true})} +/// +/// The next @FN{near} or @FN{within} operator will use the specific geo-spatial +/// index. +/// +/// @FUN{geo(@FA{latitiude}, @FA{longitude})} +/// +/// The next @FN{near} or @FN{within} operator will use the specific geo-spatial +/// index. +/// +/// @EXAMPLES +/// +/// Assume you have a location stored as list in the attribute @LIT{home} +/// and a destination stored in the attribute @LIT{work}. Than you can use the +/// @FN{geo} operator to select, which coordinates to use in a near query. +/// +/// @verbinclude simple16 +//////////////////////////////////////////////////////////////////////////////// + +AvocadoCollection.prototype.geo = function(loc, order) { + var idx; + + var locateGeoIndex1 = function(collection, loc, order) { + var inds = collection.getIndexes(); + + for (var i = 0; i < inds.length; ++i) { + var index = inds[i]; + + if (index.type == "geo") { + if (index.location == loc && index.geoJson == order) { + return index; + } + } + } + + return null; + }; + + var locateGeoIndex2 = function(collection, lat, lon) { + var inds = collection.getIndexes(); + + for (var i = 0; i < inds.length; ++i) { + var index = inds[i]; + + if (index.type == "geo") { + if (index.latitude == lat && index.longitude == lon) { + return index; + } + } + } + + return null; + }; + + if (order === undefined) { + idx = locateGeoIndex1(this, loc, false); + } + else if (typeof order === "boolean") { + idx = locateGeoIndex1(this, loc, order); + } + else { + idx = locateGeoIndex2(this, loc, order); + } + + if (idx == null) { + throw "cannot find a suitable geo index"; + } + + return new SimpleQueryGeo(this, idx.iid); +} + +AvocadoEdgesCollection.prototype.geo = AvocadoCollection.geo; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SIMPLE QUERY +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief simple query +//////////////////////////////////////////////////////////////////////////////// + +function SimpleQuery () { + this._execution = null; + this._skip = 0; + this._limit = null; + this._countQuery = null; + this._countTotal = null; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief join limits +//////////////////////////////////////////////////////////////////////////////// + +function JoinLimits (query, limit) { + var q; + + // original limit is 0, keep it + if (query._limit == 0) { + query = query.clone(); + } + + // new limit is 0, use it + else if (limit == 0) { + query = query.clone(); + query._limit = 0; + } + + // no old limit, use new limit + else if (query._limit == null) { + query = query.clone(); + query._limit = limit + } + + // both are positive, use the smaller one + else if (0 < query._limit && 0 < limit) { + query = query.clone(); + + if (limit < query._limit) { + query._limit = limit; + } + } + + // both are negative, use the greater one + else if (query._limit < 0 && limit < 0) { + query = query.clone(); + + if (query._limit < limit) { + query._limit = limit; + } + } + + // different sign + else { + q = query.toArray(); + + q = new SimpleQueryArray(q); + q._limit = limit; + q._countTotal = query._countTotal; + + query = q; + } + + return query; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief clones a query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.clone = function () { + throw "cannot clone abstract query"; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes a query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.execute = function () { + throw "cannot execute abstract query"; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief limit +/// +/// @FUN{limit(@FA{number})} +/// +/// Limits a result to the first @FA{number} documents. Specifying a limit of +/// @CODE{0} returns no documents at all. If you do not need a limit, just do +/// not add the limit operator. If you specifiy a negtive limit of @CODE{-n}, +/// this will return the last @CODE{n} documents instead. +/// +/// In general the input to @FN{limit} should be sorted. Otherwise it will be +/// unclear which documents are used in the result set. +/// +/// @EXAMPLES +/// +/// @verbinclude simple2 +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.limit = function (limit) { + if (this._execution != null) { + throw "query is already executing"; + } + + return JoinLimits(this, limit); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief skip +/// +/// @FUN{skip(@FA{number})} +/// +/// Skips the first @FA{number} documents. +/// +/// In general the input to @FN{limit} should be sorted. Otherwise it will be +/// unclear which documents are used in the result set. +/// +/// @EXAMPLES +/// +/// @verbinclude simple8 +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.skip = function (skip) { + var query; + var documents; + + if (skip == null) { + skip = 0; + } + + if (skip < 0) { + throw "skip must be non-negative"; + } + + if (this._execution != null) { + throw "query is already executing"; + } + + // no limit set, use or add skip + if (this._limit == null) { + query = this.clone(); + + if (this._skip == null || this._skip == 0) { + query._skip = skip; + } + else { + query._skip += skip; + } + } + + // limit already skip + else { + documents = this.clone(); + + query = new SimpleQueryArray(documents.toArray()); + query._skip = skip; + query._countTotal = documents._countTotal; + } + + return query; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief converts into an array +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.toArray = function () { + var cursor; + var result; + + this.execute(); + + result = []; + + while (this.hasNext()) { + result.push(this.next()); + } + + return result; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief counts the number of documents +/// +/// @FUN{count()} +/// +/// The @FN{count} operator counts the number of document in the result set and +/// returns that number. The @FN{count} operator ignores any limits and returns +/// the total number of documents found. +/// +/// @FUN{count(@LIT{true})} +/// +/// If the result set was limited by the @FN{limit} operator or documents were +/// skiped using the @FN{skip} operator, the @FN{count} operator with argument +/// @LIT{true} will use the number of elements in the final result set - after +/// applying @FN{limit} and @FN{skip}. +/// +/// @EXAMPLES +/// +/// Ignore any limit: +/// +/// @verbinclude simple9 +/// +/// Counting any limit or skip: +/// +/// @verbinclude simple10 +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.count = function (applyPagination) { + this.execute(); + + if (applyPagination === undefined || ! applyPagination) { + return this._countTotal; + } + else { + return this._countQuery; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief checks if the cursor is exhausted +/// +/// @FUN{hasNext()} +/// +/// The @FN{hasNext} operator returns @LIT{true}, then the cursor still has +/// documents. In this case the next document can be accessed using the +/// @FN{next} operator, which will advance the cursor. +/// +/// @verbinclude simple7 +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.hasNext = function () { + this.execute(); + + return this._execution.hasNext(); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the next result document +/// +/// @FUN{next()} +/// +/// If the @FN{hasNext} operator returns @LIT{true}, then the underlying +/// cursor of the simple query still has documents. In this case the +/// next document can be accessed using the @FN{next} operator, which +/// will advance the underlying cursor. If you use @FN{next} on an +/// exhausted cursor, then @LIT{undefined} is returned. +/// +/// @verbinclude simple5 +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.next = function() { + this.execute(); + + return this._execution.next(); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the next result document reference +/// +/// @FUN{nextRef()} +/// +/// If the @FN{hasNext} operator returns @LIT{true}, then the underlying cursor +/// of the simple query still has documents. In this case the next document +/// reference can be accessed using the @FN{nextRef} operator, which will +/// advance the cursor. If you use @FN{next} on an exhausted cursor, then +/// @LIT{undefined} is returned. +/// +/// @verbinclude simple6 +//////////////////////////////////////////////////////////////////////////////// + +SimpleQuery.prototype.nextRef = function() { + this.execute(); + + return this._execution.nextRef(); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SIMPLE QUERY ALL +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief all query +//////////////////////////////////////////////////////////////////////////////// + +function SimpleQueryAll (collection) { + this._collection = collection; +} + +SimpleQueryAll.prototype = new SimpleQuery(); +SimpleQueryAll.prototype.constructor = SimpleQueryAll; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief clones an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryAll.prototype.clone = function () { + var query; + + query = new SimpleQueryAll(this._collection); + query._skip = this._skip; + query._limit = this._limit; + + return query; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryAll.prototype.execute = function () { + var documents; + + if (this._execution == null) { + if (this._skip == null || this._skip <= 0) { + this._skip = 0; + } + + documents = this._collection.ALL(this._skip, this._limit); + + this._execution = new SimpleQueryArray(documents.documents); + this._countQuery = documents.count; + this._countTotal = documents.total; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief print an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryAll.prototype._PRINT = function () { + var text; + + text = "SimpleQueryAll(" + this._collection._name + ")"; + + if (this._skip != null && this._skip != 0) { + text += ".skip(" + this._skip + ")"; + } + + if (this._limit != null) { + text += ".limit(" + this._limit + ")"; + } + + internal.output(text); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SIMPLE QUERY ARRAY +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief array query +//////////////////////////////////////////////////////////////////////////////// + +function SimpleQueryArray (documents) { + this._documents = documents; + this._current = 0; + this._countTotal = documents.length; +} + +SimpleQueryArray.prototype = new SimpleQuery(); +SimpleQueryArray.prototype.constructors = SimpleQueryArray; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief clones an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryArray.prototype.clone = function () { + var query; + + query = new SimpleQueryArray(this._documents); + query._skip = this._skip; + query._limit = this._limit; + query._countTotal = this._countTotal; + + return query; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes an array query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryArray.prototype.execute = function () { + if (this._execution == null) { + this._execution = true; + + if (this._skip == null || this._skip <= 0) { + this._skip = 0; + } + + if (this._skip != 0 && this._limit == null) { + this._current = this._skip; + + this._countQuery = this._documents.length - this._skip; + + if (this._countQuery < 0) { + this._countQuery = 0; + } + } + else if (this._limit != null) { + var documents; + var start; + var end; + + if (0 == this._limit) { + start = 0; + end = 0; + } + else if (0 < this._limit) { + start = this._skip; + end = this._skip + this._limit; + } + else { + start = this._documents.length + this._limit - this._skip; + end = this._documents.length - this._skip; + } + + if (start < 0) { + start = 0; + } + + if (this._documents.length < end) { + end = this._documents.length; + } + + documents = []; + + for (var i = start; i < end; ++i) { + documents.push(this._documents[i]); + } + + this._documents = documents; + this._skip = 0; + this._limit = null; + this._countQuery = this._documents.length; + } + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief print an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryArray.prototype._PRINT = function () { + var text; + + text = "SimpleQueryArray([.. " + this._documents.length + " docs ..])"; + + if (this._skip != null && this._skip != 0) { + text += ".skip(" + this._skip + ")"; + } + + if (this._limit != null) { + text += ".limit(" + this._limit + ")"; + } + + internal.output(text); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief counts the number of documents +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryArray.prototype.count = function (applyPagination) { + this.execute(); + + if (applyPagination === undefined || ! applyPagination) { + return this._countTotal; + } + else { + return this._countQuery; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief checks if the cursor is exhausted +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryArray.prototype.hasNext = function () { + this.execute(); + + return this._current < this._documents.length; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the next result document +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryArray.prototype.next = function() { + this.execute(); + + if (this._current < this._documents.length) { + return this._documents[this._current++]; + } + else { + return undefined; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief returns the next result document reference +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryArray.prototype.nextRef = function() { + this.execute(); + + if (this._current < this._documents.length) { + return this._documents[this._current++]._id; + } + else { + return undefined; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SIMPLE QUERY GEO +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief geo index +//////////////////////////////////////////////////////////////////////////////// + +function SimpleQueryGeo (collection, index) { + this._collection = collection; + this._index = index; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief print a geo index +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryGeo.prototype._PRINT = function () { + var text; + + text = "GeoIndex(" + + this._collection._name + + ", " + + this._index + + ")"; + + internal.output(text); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs a near query for an index +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryGeo.prototype.near = function (lat, lon) { + return new SimpleQueryNear(this._collection, lat, lon, this._index); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief constructs a within query for an index +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryGeo.prototype.within = function (lat, lon, radius) { + return new SimpleQueryWithin(this._collection, lat, lon, radius, this._index); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SIMPLE QUERY NEAR +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief all query +//////////////////////////////////////////////////////////////////////////////// + +function SimpleQueryNear (collection, latitiude, longitude, iid) { + var idx; + + this._collection = collection; + this._latitude = latitiude; + this._longitude = longitude; + this._index = (iid === undefined ? null : iid); + this._distance = null; + + if (iid == null) { + idx = collection.getIndexes(); + + for (var i = 0; i < idx.length; ++i) { + var index = idx[i]; + + if (index.type == "geo") { + if (this._index == null) { + this._index = index.iid; + } + else if (index.iid < this._index) { + this._index = index.iid; + } + } + } + } + + if (this._index == null) { + throw "an geo-index must be known"; + } +} + +SimpleQueryNear.prototype = new SimpleQuery(); +SimpleQueryNear.prototype.constructor = SimpleQueryNear; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief clones an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryNear.prototype.clone = function () { + var query; + + query = new SimpleQueryNear(this._collection, this._latitude, this._longitude, this._index); + query._skip = this._skip; + query._limit = this._limit; + query._distance = this._distance; + + return query; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryNear.prototype.execute = function () { + var result; + var documents; + var distances; + var limit; + + if (this._execution == null) { + if (this._skip == null || this._skip <= 0) { + this._skip = 0; + } + + if (this._limit == null) { + limit = this._skip + 100; + } + else { + limit = this._skip + this._limit; + } + + result = this._collection.NEAR(this._index, this._latitude, this._longitude, limit); + documents = result.documents; + distances = result.distances; + + if (this._distance != null) { + for (var i = this._skip; i < documents.length; ++i) { + documents[i][this._distance] = distances[i]; + } + } + + this._execution = new SimpleQueryArray(result.documents); + this._execution._skip = this._skip; + this._countQuery = result.documents.length - this._skip; + this._countTotal = result.documents.length; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief print a near query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryNear.prototype._PRINT = function () { + var text; + + text = "SimpleQueryNear(" + + this._collection._name + + ", " + + this._latitude + + ", " + + this._longitude + + ", " + + this._index + + ")"; + + if (this._skip != null && this._skip != 0) { + text += ".skip(" + this._skip + ")"; + } + + if (this._limit != null) { + text += ".limit(" + this._limit + ")"; + } + + internal.output(text); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryNear.prototype.distance = function (attribute) { + var clone; + + clone = this.clone(); + + if (attribute) { + clone._distance = attribute; + } + else { + clone._distance = "distance"; + } + + return clone; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- SIMPLE QUERY WITHIN +// ----------------------------------------------------------------------------- + +// ----------------------------------------------------------------------------- +// --SECTION-- constructors and destructors +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief all query +//////////////////////////////////////////////////////////////////////////////// + +function SimpleQueryWithin (collection, latitiude, longitude, radius, iid) { + var idx; + + this._collection = collection; + this._latitude = latitiude; + this._longitude = longitude; + this._index = (iid === undefined ? null : iid); + this._radius = radius; + this._distance = null; + + if (iid == null) { + idx = collection.getIndexes(); + + for (var i = 0; i < idx.length; ++i) { + var index = idx[i]; + + if (index.type == "geo") { + if (this._index == null) { + this._index = index.iid; + } + else if (index.iid < this._index) { + this._index = index.iid; + } + } + } + } + + if (this._index == null) { + throw "an geo-index must be known"; + } +} + +SimpleQueryWithin.prototype = new SimpleQuery(); +SimpleQueryWithin.prototype.constructor = SimpleQueryWithin; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- private functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief clones an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryWithin.prototype.clone = function () { + var query; + + query = new SimpleQueryWithin(this._collection, this._latitude, this._longitude, this._radius, this._index); + query._skip = this._skip; + query._limit = this._limit; + query._distance = this._distance; + + return query; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes an all query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryWithin.prototype.execute = function () { + var result; + var documents; + var distances; + var limit; + + if (this._execution == null) { + result = this._collection.WITHIN(this._index, this._latitude, this._longitude, this._radius); + documents = result.documents; + distances = result.distances; + + if (this._distance != null) { + for (var i = this._skip; i < documents.length; ++i) { + documents[i][this._distance] = distances[i]; + } + } + + this._execution = new SimpleQueryArray(result.documents); + this._execution._skip = this._skip; + this._execution._limit = this._limit; + this._countQuery = result.documents.length - this._skip; + this._countTotal = result.documents.length; + } +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief print a within query +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryWithin.prototype._PRINT = function () { + var text; + + text = "SimpleQueryWithin(" + + this._collection._name + + ", " + + this._latitude + + ", " + + this._longitude + + ", " + + this._radius + + ", " + + this._index + + ")"; + + if (this._skip != null && this._skip != 0) { + text += ".skip(" + this._skip + ")"; + } + + if (this._limit != null) { + text += ".limit(" + this._limit + ")"; + } + + internal.output(text); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- public functions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup SimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief +//////////////////////////////////////////////////////////////////////////////// + +SimpleQueryWithin.prototype.distance = function (attribute) { + var clone; + + clone = this.clone(); + + if (attribute) { + clone._distance = attribute; + } + else { + clone._distance = "distance"; + } + + return clone; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- MODULE EXPORTS +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup AvocadoGraph +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +exports.AvocadoCollection = AvocadoCollection; +exports.AvocadoEdgesCollection = AvocadoEdgesCollection; +exports.SimpleQuery = SimpleQuery; +exports.SimpleQueryAll = SimpleQueryAll; +exports.SimpleQueryArray = SimpleQueryArray; +exports.SimpleQueryGeo = SimpleQueryGeo; +exports.SimpleQueryNear = SimpleQueryNear; +exports.SimpleQueryWithin = SimpleQueryWithin; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)" +// End: diff --git a/js/server/aql.js b/js/server/aql.js index 8e01b56ff8..d701d7e414 100644 --- a/js/server/aql.js +++ b/js/server/aql.js @@ -118,60 +118,8 @@ AvocadoFluentQueryInternal.prototype.constructor = AvocadoFluentQueryInternal; /// @{ //////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -/// @brief looks up a document -/// -/// @FUN{document(@FA{document-identifier})} -/// -/// The @FN{document} operator finds a document given it's identifier. It -/// returns the empty result set or a result set containing the document with -/// document identifier @FA{document-identifier}. -/// -/// @verbinclude fluent54 -/// -/// The corresponding AQL query would be: -/// -/// @verbinclude fluent54-aql -//////////////////////////////////////////////////////////////////////////////// - -AvocadoFluentQuery2.prototype.document = function (id) { - var copy; - var doc; - - if (this._execution != null) { - throw "query is already executing"; - } - - copy = this.copyQuery(); - - // try to find a document - while (copy.hasNext()) { - doc = copy.next(); - - if (doc._id == id) { - return new AvocadoFluentQueryArray(this._collection, [ doc ]); - } - } - - // nothing found - return new AvocadoFluentQueryArray(this._collection, []); -} - //////////////////////////////////////////////////////////////////////////////// /// @brief limits an existing query -/// -/// @FUN{limit(@FA{number})} -/// -/// Limits a result to the first @FA{number} documents. Specifying a limit of -/// @CODE{0} returns no documents at all. If you do not need a limit, just do -/// not add the limit operator. If you specifiy a negtive limit of @CODE{-n}, -/// this will return the last @CODE{n} documents instead. -/// -/// @verbinclude fluent30 -/// -/// The corresponding AQL queries would be: -/// -/// @verbinclude fluent30-aql //////////////////////////////////////////////////////////////////////////////// AvocadoFluentQuery2.prototype.limit = function (limit) { @@ -233,34 +181,7 @@ AvocadoFluentQuery2.prototype.limit = function (limit) { //////////////////////////////////////////////////////////////////////////////// AvocadoFluentQuery2.prototype.skip = function (skip) { - var copy; - - if (skip == null) { - skip = 0; - } - - if (skip < 0) { - throw "skip must be non-negative"; - } - - if (this._execution != null) { - throw "query is already executing"; - } - - copy = this.copyQuery(); - - if (skip != 0) { - if (copy._limit == null) { - copy._skip = copy._skip + skip; - } - else { - copy = new AvocadoFluentQueryAbstract(copy._collection, copy); - - copy._skip = skip; - } - } - - return copy; + return "DELETE"; } //////////////////////////////////////////////////////////////////////////////// @@ -514,53 +435,7 @@ AvocadoFluentQueryArray.prototype.copyQuery = function() { //////////////////////////////////////////////////////////////////////////////// AvocadoFluentQueryArray.prototype.execute = function () { - if (this._execution == null) { - this._execution = true; - - if (this._skip == null || this._skip <= 0) { - this._skip = 0; - } - - if (this._skip != 0 && this._limit == null) { - this._current = this._skip; - } - else if (this._limit != null) { - var documents; - var start; - var end; - - if (0 == this._limit) { - start = 0; - end = 0; - } - else if (0 < this._limit) { - start = this._skip; - end = this._skip + this._limit; - } - else { - start = this._documents.length + this._limit - this._skip; - end = this._documents.length - this._skip; - } - - if (start < 0) { - start = 0; - } - - if (this._documents.length < end) { - end = this._documents.length; - } - - documents = []; - - for (var i = start; i < end; ++i) { - documents.push(this._documents[i]); - } - - this._documents = documents; - this._skip = 0; - this._limit = null; - } - } + return "DELETE"; } //////////////////////////////////////////////////////////////////////////////// @@ -581,9 +456,7 @@ AvocadoFluentQueryArray.prototype.execute = function () { //////////////////////////////////////////////////////////////////////////////// AvocadoFluentQueryArray.prototype.hasNext = function () { - this.execute(); - - return this._current < this._documents.length; + return "DELETE"; } //////////////////////////////////////////////////////////////////////////////// @@ -591,14 +464,7 @@ AvocadoFluentQueryArray.prototype.hasNext = function () { //////////////////////////////////////////////////////////////////////////////// AvocadoFluentQueryArray.prototype.next = function() { - this.execute(); - - if (this._current < this._documents.length) { - return this._documents[this._current++]; - } - else { - return undefined; - } + return "DELETE"; } //////////////////////////////////////////////////////////////////////////////// @@ -606,14 +472,7 @@ AvocadoFluentQueryArray.prototype.next = function() { //////////////////////////////////////////////////////////////////////////////// AvocadoFluentQueryArray.prototype.nextRef = function() { - this.execute(); - - if (this._current < this._documents.length) { - return this._documents[this._current++]._id; - } - else { - return undefined; - } + return "DELETE"; } //////////////////////////////////////////////////////////////////////////////// @@ -621,11 +480,7 @@ AvocadoFluentQueryArray.prototype.nextRef = function() { //////////////////////////////////////////////////////////////////////////////// AvocadoFluentQueryArray.prototype.useNext = function() { - this.execute(); - - if (this._current < this._documents.length) { - this._current++; - } + return "DELETE"; } //////////////////////////////////////////////////////////////////////////////// @@ -756,7 +611,7 @@ AvocadoFluentQueryInternal.prototype.useNext = function () { //////////////////////////////////////////////////////////////////////////////// AvocadoCollection.prototype.T_all = function () { - return new AvocadoFluentQueryInternal(this); + return "DELETE"; } AvocadoEdgesCollection.prototype.T_all = AvocadoCollection.prototype.T_all; @@ -766,12 +621,7 @@ AvocadoEdgesCollection.prototype.T_all = AvocadoCollection.prototype.T_all; //////////////////////////////////////////////////////////////////////////////// AvocadoCollection.prototype.T_document = function (id) { - var query; - - query = new AvocadoFluentQueryInternal(this); - query._where = AQL_WHERE_PRIMARY_CONST(id); - - return query; + return "DOCUMENT"; } AvocadoEdgesCollection.prototype.T_document = AvocadoCollection.prototype.T_document; @@ -781,12 +631,7 @@ AvocadoEdgesCollection.prototype.T_document = AvocadoCollection.prototype.T_docu //////////////////////////////////////////////////////////////////////////////// AvocadoCollection.prototype.T_limit = function (limit) { - var query; - - query = new AvocadoFluentQueryInternal(this); - query._limit = limit; - - return query; + return "DELETE"; } AvocadoEdgesCollection.prototype.T_limit = AvocadoCollection.prototype.T_limit; @@ -796,16 +641,7 @@ AvocadoEdgesCollection.prototype.T_limit = AvocadoCollection.prototype.T_limit; //////////////////////////////////////////////////////////////////////////////// AvocadoCollection.prototype.T_skip = function (skip) { - var query; - - if (skip < 0) { - throw "skip must be non-negative"; - } - - query = new AvocadoFluentQueryInternal(this); - query._skip = skip; - - return query; + return "DELETE"; } AvocadoEdgesCollection.prototype.T_skip = AvocadoCollection.prototype.T_skip; @@ -815,17 +651,7 @@ AvocadoEdgesCollection.prototype.T_skip = AvocadoCollection.prototype.T_skip; //////////////////////////////////////////////////////////////////////////////// AvocadoCollection.prototype.toArray = function () { - var cursor; - var result; - - cursor = this.T_all(); - result = []; - - while (cursor.hasNext()) { - result.push(cursor.next()); - } - - return result; + return "DELETE"; } AvocadoEdgesCollection.prototype.toArray = AvocadoCollection.prototype.toArray; diff --git a/js/server/js-aql.h b/js/server/js-aql.h index f601f01f44..d65ce4c188 100644 --- a/js/server/js-aql.h +++ b/js/server/js-aql.h @@ -120,59 +120,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" - "/// @brief looks up a document\n" - "///\n" - "/// @FUN{document(@FA{document-identifier})}\n" - "///\n" - "/// The @FN{document} operator finds a document given it's identifier. It\n" - "/// returns the empty result set or a result set containing the document with\n" - "/// document identifier @FA{document-identifier}.\n" - "///\n" - "/// @verbinclude fluent54\n" - "///\n" - "/// The corresponding AQL query would be:\n" - "///\n" - "/// @verbinclude fluent54-aql\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" - "AvocadoFluentQuery2.prototype.document = function (id) {\n" - " var copy;\n" - " var doc;\n" - "\n" - " if (this._execution != null) {\n" - " throw \"query is already executing\";\n" - " }\n" - "\n" - " copy = this.copyQuery();\n" - "\n" - " // try to find a document\n" - " while (copy.hasNext()) {\n" - " doc = copy.next();\n" - "\n" - " if (doc._id == id) {\n" - " return new AvocadoFluentQueryArray(this._collection, [ doc ]);\n" - " }\n" - " }\n" - "\n" - " // nothing found\n" - " return new AvocadoFluentQueryArray(this._collection, []);\n" - "}\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" "/// @brief limits an existing query\n" - "///\n" - "/// @FUN{limit(@FA{number})}\n" - "///\n" - "/// Limits a result to the first @FA{number} documents. Specifying a limit of\n" - "/// @CODE{0} returns no documents at all. If you do not need a limit, just do\n" - "/// not add the limit operator. If you specifiy a negtive limit of @CODE{-n},\n" - "/// this will return the last @CODE{n} documents instead.\n" - "///\n" - "/// @verbinclude fluent30\n" - "///\n" - "/// The corresponding AQL queries would be:\n" - "///\n" - "/// @verbinclude fluent30-aql\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoFluentQuery2.prototype.limit = function (limit) {\n" @@ -234,34 +182,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoFluentQuery2.prototype.skip = function (skip) {\n" - " var copy;\n" - "\n" - " if (skip == null) {\n" - " skip = 0;\n" - " }\n" - "\n" - " if (skip < 0) {\n" - " throw \"skip must be non-negative\";\n" - " }\n" - "\n" - " if (this._execution != null) {\n" - " throw \"query is already executing\";\n" - " }\n" - "\n" - " copy = this.copyQuery();\n" - "\n" - " if (skip != 0) {\n" - " if (copy._limit == null) {\n" - " copy._skip = copy._skip + skip;\n" - " }\n" - " else {\n" - " copy = new AvocadoFluentQueryAbstract(copy._collection, copy);\n" - "\n" - " copy._skip = skip;\n" - " }\n" - " }\n" - "\n" - " return copy;\n" + " return \"DELETE\";\n" "}\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -515,53 +436,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoFluentQueryArray.prototype.execute = function () {\n" - " if (this._execution == null) {\n" - " this._execution = true;\n" - "\n" - " if (this._skip == null || this._skip <= 0) {\n" - " this._skip = 0;\n" - " }\n" - "\n" - " if (this._skip != 0 && this._limit == null) {\n" - " this._current = this._skip;\n" - " }\n" - " else if (this._limit != null) {\n" - " var documents;\n" - " var start;\n" - " var end;\n" - "\n" - " if (0 == this._limit) {\n" - " start = 0;\n" - " end = 0;\n" - " }\n" - " else if (0 < this._limit) {\n" - " start = this._skip;\n" - " end = this._skip + this._limit;\n" - " }\n" - " else {\n" - " start = this._documents.length + this._limit - this._skip;\n" - " end = this._documents.length - this._skip;\n" - " }\n" - "\n" - " if (start < 0) {\n" - " start = 0;\n" - " }\n" - "\n" - " if (this._documents.length < end) {\n" - " end = this._documents.length;\n" - " }\n" - "\n" - " documents = [];\n" - "\n" - " for (var i = start; i < end; ++i) {\n" - " documents.push(this._documents[i]);\n" - " }\n" - "\n" - " this._documents = documents;\n" - " this._skip = 0;\n" - " this._limit = null;\n" - " }\n" - " }\n" + " return \"DELETE\";\n" "}\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -582,9 +457,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoFluentQueryArray.prototype.hasNext = function () {\n" - " this.execute();\n" - "\n" - " return this._current < this._documents.length;\n" + " return \"DELETE\";\n" "}\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -592,14 +465,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoFluentQueryArray.prototype.next = function() {\n" - " this.execute();\n" - "\n" - " if (this._current < this._documents.length) {\n" - " return this._documents[this._current++];\n" - " }\n" - " else {\n" - " return undefined;\n" - " }\n" + " return \"DELETE\";\n" "}\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -607,14 +473,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoFluentQueryArray.prototype.nextRef = function() {\n" - " this.execute();\n" - "\n" - " if (this._current < this._documents.length) {\n" - " return this._documents[this._current++]._id;\n" - " }\n" - " else {\n" - " return undefined;\n" - " }\n" + " return \"DELETE\";\n" "}\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -622,11 +481,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoFluentQueryArray.prototype.useNext = function() {\n" - " this.execute();\n" - "\n" - " if (this._current < this._documents.length) {\n" - " this._current++;\n" - " }\n" + " return \"DELETE\";\n" "}\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -757,7 +612,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoCollection.prototype.T_all = function () {\n" - " return new AvocadoFluentQueryInternal(this);\n" + " return \"DELETE\";\n" "}\n" "\n" "AvocadoEdgesCollection.prototype.T_all = AvocadoCollection.prototype.T_all;\n" @@ -767,12 +622,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoCollection.prototype.T_document = function (id) {\n" - " var query;\n" - "\n" - " query = new AvocadoFluentQueryInternal(this);\n" - " query._where = AQL_WHERE_PRIMARY_CONST(id);\n" - "\n" - " return query;\n" + " return \"DOCUMENT\";\n" "}\n" "\n" "AvocadoEdgesCollection.prototype.T_document = AvocadoCollection.prototype.T_document;\n" @@ -782,12 +632,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoCollection.prototype.T_limit = function (limit) {\n" - " var query;\n" - "\n" - " query = new AvocadoFluentQueryInternal(this);\n" - " query._limit = limit;\n" - "\n" - " return query;\n" + " return \"DELETE\";\n" "}\n" "\n" "AvocadoEdgesCollection.prototype.T_limit = AvocadoCollection.prototype.T_limit;\n" @@ -797,16 +642,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoCollection.prototype.T_skip = function (skip) {\n" - " var query;\n" - "\n" - " if (skip < 0) {\n" - " throw \"skip must be non-negative\";\n" - " }\n" - "\n" - " query = new AvocadoFluentQueryInternal(this);\n" - " query._skip = skip;\n" - "\n" - " return query;\n" + " return \"DELETE\";\n" "}\n" "\n" "AvocadoEdgesCollection.prototype.T_skip = AvocadoCollection.prototype.T_skip;\n" @@ -816,17 +652,7 @@ static string JS_server_aql = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "AvocadoCollection.prototype.toArray = function () {\n" - " var cursor;\n" - " var result;\n" - "\n" - " cursor = this.T_all();\n" - " result = [];\n" - "\n" - " while (cursor.hasNext()) {\n" - " result.push(cursor.next());\n" - " }\n" - "\n" - " return result;\n" + " return \"DELETE\";\n" "}\n" "\n" "AvocadoEdgesCollection.prototype.toArray = AvocadoCollection.prototype.toArray;\n" diff --git a/js/server/js-json.h b/js/server/js-json.h index ac5a0a3a8f..ef28bd115c 100644 --- a/js/server/js-json.h +++ b/js/server/js-json.h @@ -46,16 +46,16 @@ static string JS_server_json = " status = this.status();\n" "\n" " if (status == 1) {\n" - " return \"[new born collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[new born collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else if (status == 2) {\n" - " return \"[unloaded collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[unloaded collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else if (status == 3) {\n" - " return \"[collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else {\n" - " return \"[corrupted collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[corrupted collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " }\n" " else {\n" @@ -191,16 +191,16 @@ static string JS_server_json = " status = this.status();\n" "\n" " if (status == 1) {\n" - " return \"[new born collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[new born collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else if (status == 2) {\n" - " return \"[unloaded collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[unloaded collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else if (status == 3) {\n" - " return \"[collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else {\n" - " return \"[corrupted collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[corrupted collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " }\n" " else {\n" @@ -219,16 +219,16 @@ static string JS_server_json = " status = this.status();\n" "\n" " if (status == 1) {\n" - " return \"[new born collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[new born collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else if (status == 2) {\n" - " return \"[unloaded collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[unloaded collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else if (status == 3) {\n" - " return \"[collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " else {\n" - " return \"[corrupted collection at \" + JSON.stringify(this._name) + \"]\";\n" + " return \"[corrupted collection \" + JSON.stringify(this._name) + \"]\";\n" " }\n" " }\n" " else {\n" @@ -240,40 +240,6 @@ static string JS_server_json = "/// @}\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" - "// -----------------------------------------------------------------------------\n" - "// --SECTION-- AvocadoFluentQuery\n" - "// -----------------------------------------------------------------------------\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "/// @brief string representation of a query\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" - "AvocadoFluentQuery.prototype.toString = function() {\n" - " if (this instanceof AvocadoFluentQuery) {\n" - " return \"[query]\";\n" - " }\n" - " else {\n" - " return \"[object]\";\n" - " }\n" - "}\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "/// @brief JSON representation of a query\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" - "AvocadoFluentQuery.prototype.toJSON = function() {\n" - " if (this instanceof AvocadoFluentQuery) {\n" - " return \"[query]\";\n" - " }\n" - " else {\n" - " return \"[object]\";\n" - " }\n" - "}\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "/// @}\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" "// Local Variables:\n" "// mode: outline-minor\n" "// outline-regexp: \"^\\\\(/// @brief\\\\|/// @addtogroup\\\\|// --SECTION--\\\\|/// @page\\\\|/// @}\\\\)\"\n" diff --git a/js/server/js-modules.h b/js/server/js-modules.h index e46f2f4c07..e40c0607a2 100644 --- a/js/server/js-modules.h +++ b/js/server/js-modules.h @@ -6,7 +6,7 @@ static string JS_server_modules = "///\n" "/// DISCLAIMER\n" "///\n" - "/// Copyright 2010-2011 triagens GmbH, Cologne, Germany\n" + "/// Copyright 2011-2012 triagens GmbH, Cologne, Germany\n" "///\n" "/// Licensed under the Apache License, Version 2.0 (the \"License\");\n" "/// you may not use this file except in compliance with the License.\n" @@ -23,11 +23,32 @@ static string JS_server_modules = "/// Copyright holder is triAGENS GmbH, Cologne, Germany\n" "///\n" "/// @author Dr. Frank Celler\n" - "/// @author Copyright 2011, triAGENS GmbH, Cologne, Germany\n" + "/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "/// @page JSModuleAvocadoTOC\n" + "///\n" + "///
      \n" + "///
    1. @ref JSModuleAvocadoDefineHttpSystemAction \"avocado.defineHttpSystemAction\"
    2. \n" + "///
    \n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "/// @page JSModuleAvocado Module \"avocado\"\n" + "///\n" + "/// The following functions are used avocadoly.\n" + "///\n" + "///
    \n" + "/// @copydoc JSModuleAvocadoTOC\n" + "///
    \n" + "///\n" + "/// @anchor JSModuleAvocadoDefineHttpSystemAction\n" + "/// @copydetails JS_DefineSystemAction\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" "// -----------------------------------------------------------------------------\n" - "// --SECTION-- Module\n" + "// --SECTION-- Module \"internal\"\n" "// -----------------------------------------------------------------------------\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" @@ -48,6 +69,51 @@ static string JS_server_modules = "/// @}\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" + "// -----------------------------------------------------------------------------\n" + "// --SECTION-- Module \"avocado\"\n" + "// -----------------------------------------------------------------------------\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "/// @addtogroup V8ModuleAvocado\n" + "/// @{\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "/// @brief avocado module\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" + "ModuleCache[\"/avocado\"] = new Module(\"/avocado\");\n" + "\n" + "if (typeof defineSystemAction == \"function\") {\n" + " ModuleCache[\"/avocado\"].exports.defineHttpSystemAction = defineSystemAction;\n" + "}\n" + "\n" + "avocado = ModuleCache[\"/avocado\"].exports;\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "/// @}\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" + "// -----------------------------------------------------------------------------\n" + "// --SECTION-- Module \"simple-query\"\n" + "// -----------------------------------------------------------------------------\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "/// @addtogroup V8ModuleSimpleQuery\n" + "/// @{\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" + "try {\n" + " require(\"simple-query\");\n" + "}\n" + "catch (err) {\n" + " console.error(\"while loading 'simple-query' module: \" + err);\n" + "}\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "/// @}\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" "// Local Variables:\n" "// mode: outline-minor\n" "// outline-regexp: \"^\\\\(/// @brief\\\\|/// @addtogroup\\\\|// --SECTION--\\\\|/// @page\\\\|/// @}\\\\)\"\n" diff --git a/js/server/js-shell.h b/js/server/js-shell.h index 7de1a4541f..d86eee8e9b 100644 --- a/js/server/js-shell.h +++ b/js/server/js-shell.h @@ -38,78 +38,10 @@ static string JS_server_shell = "////////////////////////////////////////////////////////////////////////////////\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" - "/// @brief global variable holding the current printed query\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" - "var it = undefined;\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "/// @brief number of results to print\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" - "var queryLimit = 20;\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" "/// @brief prints a query\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" - "AvocadoFluentQuery.prototype.PRINT = function() {\n" - " if (this instanceof AvocadoFluentQuery) {\n" - " var count = 0;\n" - "\n" - " try {\n" - " while (this.hasNext() && count++ < queryLimit) {\n" - " internal.output(JSON.stringify(this.next()), \"\\n\");\n" - " }\n" - "\n" - " if (this.hasNext()) {\n" - " internal.output(\"...more results...\");\n" - " }\n" - "\n" - " it = this;\n" - " }\n" - " catch (e) {\n" - " internal.output(\"encountered error while printing: \" + e);\n" - " }\n" - " }\n" - " else {\n" - " internal.output(this.toString());\n" - " }\n" - "}\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "/// @brief prints a query\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" - "AvocadoFluentQuery2.prototype.PRINT = function() {\n" - " if (this instanceof AvocadoFluentQuery2) {\n" - " var count = 0;\n" - "\n" - " try {\n" - " while (this.hasNext() && count++ < queryLimit) {\n" - " internal.output(JSON.stringify(this.next()), \"\\n\");\n" - " }\n" - "\n" - " if (this.hasNext()) {\n" - " internal.output(\"...more results...\");\n" - " }\n" - "\n" - " it = this;\n" - " }\n" - " catch (e) {\n" - " internal.output(\"encountered error while printing: \" + e);\n" - " }\n" - " }\n" - " else {\n" - " internal.output(this.toString());\n" - " }\n" - "}\n" - "\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "/// @brief prints a query\n" - "////////////////////////////////////////////////////////////////////////////////\n" - "\n" - "AvocadoCursor.prototype.PRINT = function() {\n" + "AvocadoCursor.prototype._PRINT = function() {\n" " if (this instanceof AvocadoCursor) {\n" " var count = 0;\n" "\n" @@ -134,6 +66,19 @@ static string JS_server_shell = "}\n" "\n" "////////////////////////////////////////////////////////////////////////////////\n" + "/// @brief prints a shaped json\n" + "////////////////////////////////////////////////////////////////////////////////\n" + "\n" + "ShapedJson.prototype._PRINT = function(seen, path, names) {\n" + " if (this instanceof ShapedJson) {\n" + " PRINT_OBJECT(this, seen, path, names);\n" + " }\n" + " else {\n" + " internal.output(this.toString());\n" + " }\n" + "}\n" + "\n" + "////////////////////////////////////////////////////////////////////////////////\n" "/// @}\n" "////////////////////////////////////////////////////////////////////////////////\n" "\n" diff --git a/js/server/json.js b/js/server/json.js index c0a340d0d2..76127b3521 100644 --- a/js/server/json.js +++ b/js/server/json.js @@ -45,16 +45,16 @@ AvocadoCollection.prototype.toString = function() { status = this.status(); if (status == 1) { - return "[new born collection at " + JSON.stringify(this._name) + "]"; + return "[new born collection " + JSON.stringify(this._name) + "]"; } else if (status == 2) { - return "[unloaded collection at " + JSON.stringify(this._name) + "]"; + return "[unloaded collection " + JSON.stringify(this._name) + "]"; } else if (status == 3) { - return "[collection at " + JSON.stringify(this._name) + "]"; + return "[collection " + JSON.stringify(this._name) + "]"; } else { - return "[corrupted collection at " + JSON.stringify(this._name) + "]"; + return "[corrupted collection " + JSON.stringify(this._name) + "]"; } } else { @@ -190,16 +190,16 @@ AvocadoEdgesCollection.prototype.toString = function() { status = this.status(); if (status == 1) { - return "[new born collection at " + JSON.stringify(this._name) + "]"; + return "[new born collection " + JSON.stringify(this._name) + "]"; } else if (status == 2) { - return "[unloaded collection at " + JSON.stringify(this._name) + "]"; + return "[unloaded collection " + JSON.stringify(this._name) + "]"; } else if (status == 3) { - return "[collection at " + JSON.stringify(this._name) + "]"; + return "[collection " + JSON.stringify(this._name) + "]"; } else { - return "[corrupted collection at " + JSON.stringify(this._name) + "]"; + return "[corrupted collection " + JSON.stringify(this._name) + "]"; } } else { @@ -218,16 +218,16 @@ AvocadoEdgesCollection.prototype.toJSON = function() { status = this.status(); if (status == 1) { - return "[new born collection at " + JSON.stringify(this._name) + "]"; + return "[new born collection " + JSON.stringify(this._name) + "]"; } else if (status == 2) { - return "[unloaded collection at " + JSON.stringify(this._name) + "]"; + return "[unloaded collection " + JSON.stringify(this._name) + "]"; } else if (status == 3) { - return "[collection at " + JSON.stringify(this._name) + "]"; + return "[collection " + JSON.stringify(this._name) + "]"; } else { - return "[corrupted collection at " + JSON.stringify(this._name) + "]"; + return "[corrupted collection " + JSON.stringify(this._name) + "]"; } } else { @@ -239,40 +239,6 @@ AvocadoEdgesCollection.prototype.toJSON = function() { /// @} //////////////////////////////////////////////////////////////////////////////// -// ----------------------------------------------------------------------------- -// --SECTION-- AvocadoFluentQuery -// ----------------------------------------------------------------------------- - -//////////////////////////////////////////////////////////////////////////////// -/// @brief string representation of a query -//////////////////////////////////////////////////////////////////////////////// - -AvocadoFluentQuery.prototype.toString = function() { - if (this instanceof AvocadoFluentQuery) { - return "[query]"; - } - else { - return "[object]"; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief JSON representation of a query -//////////////////////////////////////////////////////////////////////////////// - -AvocadoFluentQuery.prototype.toJSON = function() { - if (this instanceof AvocadoFluentQuery) { - return "[query]"; - } - else { - return "[object]"; - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @} -//////////////////////////////////////////////////////////////////////////////// - // Local Variables: // mode: outline-minor // outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)" diff --git a/js/server/modules.js b/js/server/modules.js index cc18105d92..c7c0fcde8a 100644 --- a/js/server/modules.js +++ b/js/server/modules.js @@ -5,7 +5,7 @@ /// /// DISCLAIMER /// -/// Copyright 2010-2011 triagens GmbH, Cologne, Germany +/// Copyright 2011-2012 triagens 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. @@ -22,11 +22,32 @@ /// Copyright holder is triAGENS GmbH, Cologne, Germany /// /// @author Dr. Frank Celler -/// @author Copyright 2011, triAGENS GmbH, Cologne, Germany +/// @author Copyright 2011-2012, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @page JSModuleAvocadoTOC +/// +///
      +///
    1. @ref JSModuleAvocadoDefineHttpSystemAction "avocado.defineHttpSystemAction"
    2. +///
    +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @page JSModuleAvocado Module "avocado" +/// +/// The following functions are used avocadoly. +/// +///
    +/// @copydoc JSModuleAvocadoTOC +///
    +/// +/// @anchor JSModuleAvocadoDefineHttpSystemAction +/// @copydetails JS_DefineSystemAction //////////////////////////////////////////////////////////////////////////////// // ----------------------------------------------------------------------------- -// --SECTION-- Module +// --SECTION-- Module "internal" // ----------------------------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// @@ -47,6 +68,51 @@ ModuleCache["/internal"].exports.AvocadoEdgesCollection = AvocadoEdgesCollection /// @} //////////////////////////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- +// --SECTION-- Module "avocado" +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup V8ModuleAvocado +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief avocado module +//////////////////////////////////////////////////////////////////////////////// + +ModuleCache["/avocado"] = new Module("/avocado"); + +if (typeof defineSystemAction == "function") { + ModuleCache["/avocado"].exports.defineHttpSystemAction = defineSystemAction; +} + +avocado = ModuleCache["/avocado"].exports; + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- Module "simple-query" +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup V8ModuleSimpleQuery +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +try { + require("simple-query"); +} +catch (err) { + console.error("while loading 'simple-query' module: " + err); +} + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + // Local Variables: // mode: outline-minor // outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)" diff --git a/js/server/shell.js b/js/server/shell.js index 0a5d1abb4a..5a21ae56d8 100644 --- a/js/server/shell.js +++ b/js/server/shell.js @@ -36,79 +36,11 @@ var internal = require("internal"); /// @{ //////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -/// @brief global variable holding the current printed query -//////////////////////////////////////////////////////////////////////////////// - -var it = undefined; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief number of results to print -//////////////////////////////////////////////////////////////////////////////// - -var queryLimit = 20; - //////////////////////////////////////////////////////////////////////////////// /// @brief prints a query //////////////////////////////////////////////////////////////////////////////// -AvocadoFluentQuery.prototype.PRINT = function() { - if (this instanceof AvocadoFluentQuery) { - var count = 0; - - try { - while (this.hasNext() && count++ < queryLimit) { - internal.output(JSON.stringify(this.next()), "\n"); - } - - if (this.hasNext()) { - internal.output("...more results..."); - } - - it = this; - } - catch (e) { - internal.output("encountered error while printing: " + e); - } - } - else { - internal.output(this.toString()); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints a query -//////////////////////////////////////////////////////////////////////////////// - -AvocadoFluentQuery2.prototype.PRINT = function() { - if (this instanceof AvocadoFluentQuery2) { - var count = 0; - - try { - while (this.hasNext() && count++ < queryLimit) { - internal.output(JSON.stringify(this.next()), "\n"); - } - - if (this.hasNext()) { - internal.output("...more results..."); - } - - it = this; - } - catch (e) { - internal.output("encountered error while printing: " + e); - } - } - else { - internal.output(this.toString()); - } -} - -//////////////////////////////////////////////////////////////////////////////// -/// @brief prints a query -//////////////////////////////////////////////////////////////////////////////// - -AvocadoCursor.prototype.PRINT = function() { +AvocadoCursor.prototype._PRINT = function() { if (this instanceof AvocadoCursor) { var count = 0; @@ -132,6 +64,19 @@ AvocadoCursor.prototype.PRINT = function() { } } +//////////////////////////////////////////////////////////////////////////////// +/// @brief prints a shaped json +//////////////////////////////////////////////////////////////////////////////// + +ShapedJson.prototype._PRINT = function(seen, path, names) { + if (this instanceof ShapedJson) { + PRINT_OBJECT(this, seen, path, names); + } + else { + internal.output(this.toString()); + } +} + //////////////////////////////////////////////////////////////////////////////// /// @} //////////////////////////////////////////////////////////////////////////////// diff --git a/js/system/collections.js b/js/system/collections.js index 90f9a767e8..02c5bcc70a 100644 --- a/js/system/collections.js +++ b/js/system/collections.js @@ -25,6 +25,8 @@ /// @author Copyright 2011, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// +var defineHttpSystemAction = require("avocado").defineHttpSystemAction; + // ----------------------------------------------------------------------------- // --SECTION-- administration actions // ----------------------------------------------------------------------------- @@ -55,7 +57,7 @@ /// @verbinclude rest15 //////////////////////////////////////////////////////////////////////////////// -defineSystemAction("collections", +defineHttpSystemAction("collections", function (req, res) { var colls; var coll; @@ -92,7 +94,7 @@ defineSystemAction("collections", /// @verbinclude restX //////////////////////////////////////////////////////////////////////////////// -defineSystemAction("collection/load", +defineHttpSystemAction("collection/load", function (req, res) { try { req.collection.load(); @@ -120,7 +122,7 @@ defineSystemAction("collection/load", /// @verbinclude rest16 //////////////////////////////////////////////////////////////////////////////// -defineSystemAction("collection/info", +defineHttpSystemAction("collection/info", function (req, res) { try { result = {}; @@ -148,7 +150,7 @@ defineSystemAction("collection/info", /// @REST{GET /_system/documents} //////////////////////////////////////////////////////////////////////////////// -defineSystemAction("documents", +defineHttpSystemAction("documents", function (req, res) { queryReferences(req, res, req.collection.all()); }, diff --git a/js/system/indexes.js b/js/system/indexes.js index 9721097751..b5de51ca66 100644 --- a/js/system/indexes.js +++ b/js/system/indexes.js @@ -25,6 +25,8 @@ /// @author Copyright 2011, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// +var defineHttpSystemAction = require("avocado").defineHttpSystemAction; + // ----------------------------------------------------------------------------- // --SECTION-- administration actions // ----------------------------------------------------------------------------- @@ -42,7 +44,7 @@ /// Returns information about all indexes of a collection of the database. //////////////////////////////////////////////////////////////////////////////// -defineSystemAction("collection/indexes", +defineHttpSystemAction("collection/indexes", function (req, res) { try { result = {}; diff --git a/js/system/system.js b/js/system/system.js new file mode 100644 index 0000000000..0acf34392e --- /dev/null +++ b/js/system/system.js @@ -0,0 +1,60 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief system actions for monitoring +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Dr. Frank Celler +/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +var httpSystemAction = require("avocado").defineHttpSystemAction; + +// ----------------------------------------------------------------------------- +// --SECTION-- administration actions +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @addtogroup ActionsAdmin +/// @{ +//////////////////////////////////////////////////////////////////////////////// + +httpSystemAction("status", + function (req, res) { + try { + result = {}; + result.system = SYS_PROCESS_STAT(); + + actionResult(req, res, 200, result); + } + catch (err) { + actionError(req, res, err); + } + } +); + +//////////////////////////////////////////////////////////////////////////////// +/// @} +//////////////////////////////////////////////////////////////////////////////// + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)" +// End: diff --git a/js/tests/aql.js b/js/tests/aql.js new file mode 100644 index 0000000000..ccad997aab --- /dev/null +++ b/js/tests/aql.js @@ -0,0 +1,519 @@ +//////////////////////////////////////////////////////////////////////////////// +/// @brief tests for "aql.js" +/// +/// @file +/// +/// DISCLAIMER +/// +/// Copyright 2010-2012 triagens 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 triAGENS GmbH, Cologne, Germany +/// +/// @author Jan Steemann +/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test suite +//////////////////////////////////////////////////////////////////////////////// + +function aqlTestSuite () { + var collection = null; + +//////////////////////////////////////////////////////////////////////////////// +/// @brief set up +//////////////////////////////////////////////////////////////////////////////// + + function setUp () { + this.collection = db.UnitTestsNumbersList; + + if (this.collection.count() == 0) { + for (var i = 0; i <= 20; i++) { + for (var j = 0; j <= i; j++) { + this.collection.save({ value1: i, value2: j, value3: i * j}); + } + } + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief tear down +//////////////////////////////////////////////////////////////////////////////// + + function tearDown () { + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief execute a given query +//////////////////////////////////////////////////////////////////////////////// + + function executeQuery (query) { + var aQuery = AQL_PREPARE(db, query); + if (aQuery) { + return aQuery.execute(); + } + return aQuery; + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief execute a given query and return the results as an array +//////////////////////////////////////////////////////////////////////////////// + + function getQueryResults (query) { + var aCursor = this.executeQuery(query); + if (aCursor) { + var results = [ ]; + while (aCursor.hasNext()) { + results.push(aCursor.next()); + } + return results; + } + return aCursor; + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief assemble a query string from the parameters given +//////////////////////////////////////////////////////////////////////////////// + + function assembleQuery (value1, value2, limit) { + var query = 'SELECT { } FROM ' + this.collection._name + ' c WHERE '; + var cond = ''; + + if (value1 !== undefined) { + cond += value1; + } + if (value2 !== undefined) { + if (cond != '') { + cond += ' && '; + } + cond += value2; + } + query += cond; + + if (limit !== undefined) { + query += ' LIMIT ' + limit; + } + + return query; + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief check the length of a query result set +//////////////////////////////////////////////////////////////////////////////// + + function checkLength (expected, value1, value2, limit) { + var query = this.assembleQuery(value1, value2, limit); + var result = this.getQueryResults(query); + assertTrue(result instanceof Array); + var actual = result.length; + assertEqual(expected, actual); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for a simple eq condition matches +//////////////////////////////////////////////////////////////////////////////// + + function testResultLengthsEqIndividual1 () { + for (i = 0; i <= 20; i++) { + this.checkLength(i + 1, 'c.value1 == ' + i); + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for a simple eq condition matches +//////////////////////////////////////////////////////////////////////////////// + + function testResultLengthsEqIndividual2 () { + for (i = 0; i <= 20; i++) { + this.checkLength(21 - i, undefined, 'c.value2 == ' + i); + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for combined eq conditions match +//////////////////////////////////////////////////////////////////////////////// + + function testResultLengthsEqCombined () { + for (i = 0; i <= 20; i++) { + for (j = 0; j <= i; j++) { + this.checkLength(1, 'c.value1 == ' + i, 'c.value2 == ' + j); + } + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for range queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testResultLengthsBetweenIndividual1 () { + for (i = 0; i <= 20; i++) { + this.checkLength(i + 1, 'c.value1 >= ' + i, 'c.value1 <= ' + i); + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for (senseless) range queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testResultLengthsBetweenIndividual2 () { + for (i = 0; i <= 20; i++) { + this.checkLength(0, 'c.value1 > ' + i, 'c.value1 < ' + i); + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for single-range queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testResultLengthsLessIndividual1 () { + var expected = 0; + for (i = 0; i <= 20; i++) { + for (var j = 0; j <= i; j++, expected++); + this.checkLength(expected, 'c.value1 <= ' + i); + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for range queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testResultLengthsLessIndividual2 () { + var expected = 0; + for (i = 0; i <= 20; i++) { + expected += 21 - i; + this.checkLength(expected, 'c.value2 <= ' + i); + } + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for out-of-range queries is 0 +//////////////////////////////////////////////////////////////////////////////// + + function testNonResultsIndividual1 () { + this.checkLength(0, 'c.value1 < 0'); + this.checkLength(0, 'c.value1 <= -0.01'); + this.checkLength(0, 'c.value1 < -0.1'); + this.checkLength(0, 'c.value1 <= -0.1'); + this.checkLength(0, 'c.value1 <= -1'); + this.checkLength(0, 'c.value1 <= -1.0'); + this.checkLength(0, 'c.value1 < -10'); + this.checkLength(0, 'c.value1 <= -100'); + + this.checkLength(0, 'c.value1 == 21'); + this.checkLength(0, 'c.value1 == 110'); + this.checkLength(0, 'c.value1 == 20.001'); + this.checkLength(0, 'c.value1 > 20'); + this.checkLength(0, 'c.value1 >= 20.01'); + this.checkLength(0, 'c.value1 > 100'); + this.checkLength(0, 'c.value1 >= 100'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for out-of-range queries is 0 +//////////////////////////////////////////////////////////////////////////////// + + function testNonResultsIndividual2 () { + this.checkLength(0, 'c.value2 < 0'); + this.checkLength(0, 'c.value2 <= -0.01'); + this.checkLength(0, 'c.value2 < -0.1'); + this.checkLength(0, 'c.value2 <= -0.1'); + this.checkLength(0, 'c.value2 <= -1'); + this.checkLength(0, 'c.value2 <= -1.0'); + this.checkLength(0, 'c.value2 < -10'); + this.checkLength(0, 'c.value2 <= -100'); + + this.checkLength(0, 'c.value2 == 21'); + this.checkLength(0, 'c.value2 === 21'); + this.checkLength(0, 'c.value2 == 110'); + this.checkLength(0, 'c.value2 == 20.001'); + this.checkLength(0, 'c.value2 > 20'); + this.checkLength(0, 'c.value2 >= 20.01'); + this.checkLength(0, 'c.value2 > 100'); + this.checkLength(0, 'c.value2 >= 100'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for out-of-range queries is 0 +//////////////////////////////////////////////////////////////////////////////// + + function testNonResultsCombined () { + this.checkLength(0, 'c.value1 > 0', 'c.value2 > 20'); + this.checkLength(0, 'c.value1 >= 0', 'c.value2 > 20'); + this.checkLength(0, 'c.value1 < 0', 'c.value2 > 0'); + this.checkLength(0, 'c.value1 < 0', 'c.value2 >= 0'); + + this.checkLength(0, 'c.value1 == 21', 'c.value2 == 0'); + this.checkLength(0, 'c.value1 == 21', 'c.value2 == 1'); + this.checkLength(0, 'c.value1 == 21', 'c.value2 >= 0'); + this.checkLength(0, 'c.value1 == 1', 'c.value2 == 21'); + this.checkLength(0, 'c.value1 == 0', 'c.value2 == 21'); + this.checkLength(0, 'c.value1 >= 0', 'c.value2 == 21'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for (illogical) ranges is 0 +//////////////////////////////////////////////////////////////////////////////// + + function testNonResultsIllogical () { + this.checkLength(0, 'c.value1 > 0', 'c.value1 > 20'); + this.checkLength(0, 'c.value1 >= 0', 'c.value1 > 20'); + this.checkLength(0, 'c.value1 == 0', 'c.value1 > 20'); + this.checkLength(0, 'c.value1 === 0', 'c.value1 > 20'); + this.checkLength(0, 'c.value1 !== 0', 'c.value1 > 20'); + this.checkLength(0, 'c.value1 != 0', 'c.value1 > 20'); + this.checkLength(0, 'c.value1 > 20', 'c.value1 > 0'); + this.checkLength(0, 'c.value1 > 20', 'c.value1 >= 0'); + this.checkLength(0, 'c.value1 >= 21', 'c.value1 > 0'); + this.checkLength(0, 'c.value1 >= 21', 'c.value1 >= 0'); + this.checkLength(0, 'c.value1 >= 21', 'c.value1 == 0'); + this.checkLength(0, 'c.value1 >= 21', 'c.value1 === 0'); + this.checkLength(0, 'c.value1 >= 21', 'c.value1 !== 0'); + this.checkLength(0, 'c.value1 >= 21', 'c.value1 != 0'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for limit queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testLimitNonOffset1 () { + this.checkLength(0, 'c.value1 == 0', undefined, '0'); + this.checkLength(0, 'c.value1 == 0', undefined, '0,0'); + + this.checkLength(1, 'c.value1 == 0', undefined, '1'); + this.checkLength(1, 'c.value1 == 0', undefined, '2'); + this.checkLength(1, 'c.value1 == 0', undefined, '3'); + + this.checkLength(1, 'c.value1 == 0', undefined, '0,1'); + this.checkLength(1, 'c.value1 == 0', undefined, '0,2'); + this.checkLength(1, 'c.value1 == 0', undefined, '0,3'); + + this.checkLength(1, 'c.value1 == 0', undefined, '0,-1'); + this.checkLength(1, 'c.value1 == 0', undefined, '0,-2'); + this.checkLength(1, 'c.value1 == 0', undefined, '0,-3'); + + this.checkLength(1, 'c.value1 == 0', undefined, '-1'); + this.checkLength(1, 'c.value1 == 0', undefined, '-2'); + this.checkLength(1, 'c.value1 == 0', undefined, '-3'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for limit queries w/ offset matches +//////////////////////////////////////////////////////////////////////////////// + + function testLimitOffset1 () { + this.checkLength(0, 'c.value1 == 0', undefined, '1,1'); + this.checkLength(0, 'c.value1 == 0', undefined, '1,-1'); + this.checkLength(0, 'c.value1 == 0', undefined, '1,0'); + + this.checkLength(0, 'c.value1 == 0', undefined, '1,2'); + this.checkLength(0, 'c.value1 == 0', undefined, '1,-2'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for limit queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testLimitNonOffset2 () { + this.checkLength(0, 'c.value1 == 3', undefined, '0'); + this.checkLength(0, 'c.value1 == 3', undefined, '0,0'); + + this.checkLength(1, 'c.value1 == 3', undefined, '1'); + this.checkLength(2, 'c.value1 == 3', undefined, '2'); + this.checkLength(3, 'c.value1 == 3', undefined, '3'); + + this.checkLength(1, 'c.value1 == 3', undefined, '0,1'); + this.checkLength(2, 'c.value1 == 3', undefined, '0,2'); + this.checkLength(3, 'c.value1 == 3', undefined, '0,3'); + + this.checkLength(1, 'c.value1 == 3', undefined, '0,-1'); + this.checkLength(2, 'c.value1 == 3', undefined, '0,-2'); + this.checkLength(3, 'c.value1 == 3', undefined, '0,-3'); + + this.checkLength(1, 'c.value1 == 3', undefined, '-1'); + this.checkLength(2, 'c.value1 == 3', undefined, '-2'); + this.checkLength(3, 'c.value1 == 3', undefined, '-3'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for limit queries w/ offset matches +//////////////////////////////////////////////////////////////////////////////// + + function testLimitOffset2 () { + this.checkLength(1, 'c.value1 == 3', undefined, '1,1'); + this.checkLength(1, 'c.value1 == 3', undefined, '1,-1'); + this.checkLength(0, 'c.value1 == 3', undefined, '1,0'); + + this.checkLength(2, 'c.value1 == 3', undefined, '1,2'); + this.checkLength(3, 'c.value1 == 3', undefined, '1,3'); + this.checkLength(2, 'c.value1 == 3', undefined, '1,-2'); + this.checkLength(3, 'c.value1 == 3', undefined, '1,-3'); + + this.checkLength(2, 'c.value1 == 3', undefined, '2,2'); + this.checkLength(2, 'c.value1 == 3', undefined, '2,3'); + this.checkLength(2, 'c.value1 == 3', undefined, '2,-2'); + this.checkLength(2, 'c.value1 == 3', undefined, '2,-3'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for limit queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testLimitNonOffset3 () { + this.checkLength(0, 'c.value1 == 10', undefined, '0'); + this.checkLength(10, 'c.value1 == 10', undefined, '10'); + this.checkLength(10, 'c.value1 == 10', undefined, '0,10'); + this.checkLength(11, 'c.value1 == 10', undefined, '0,11'); + this.checkLength(11, 'c.value1 == 10', undefined, '0,12'); + this.checkLength(11, 'c.value1 == 10', undefined, '0,100'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for limit queries w/ offset matches +//////////////////////////////////////////////////////////////////////////////// + + function testLimitOffset3 () { + this.checkLength(10, 'c.value1 == 10', undefined, '1,10'); + this.checkLength(10, 'c.value1 == 10', undefined, '1,100'); + this.checkLength(10, 'c.value1 == 10', undefined, '1,-10'); + this.checkLength(10, 'c.value1 == 10', undefined, '1,-100'); + this.checkLength(9, 'c.value1 == 10', undefined, '2,10'); + this.checkLength(9, 'c.value1 == 10', undefined, '2,11'); + + this.checkLength(1, 'c.value1 == 10', undefined, '10,10'); + this.checkLength(1, 'c.value1 == 10', undefined, '10,-10'); + this.checkLength(0, 'c.value1 == 10', undefined, '100,1'); + this.checkLength(0, 'c.value1 == 10', undefined, '100,10'); + this.checkLength(0, 'c.value1 == 10', undefined, '100,100'); + } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief test if the number of results for some prefab queries matches +//////////////////////////////////////////////////////////////////////////////// + + function testMixedQueries () { + this.checkLength(175,'c.value1 != 0', 'c.value2 < 11'); + this.checkLength(0,'c.value1 < 0', 'c.value2 > 14'); + this.checkLength(0,'c.value1 === 0', 'c.value2 === 18'); + this.checkLength(0,'c.value1 < 0', 'c.value2 >= 19'); + this.checkLength(1,'c.value1 == 0', 'c.value2 != 2'); + this.checkLength(0,'c.value1 < 0', 'c.value2 == 3'); + this.checkLength(0,'c.value1 <= 0', 'c.value2 > 4'); + this.checkLength(111,'c.value1 >= 0', 'c.value2 < 6'); + this.checkLength(7,'c.value1 > 10', 'c.value2 == 14'); + this.checkLength(7,'c.value1 != 10', 'c.value2 === 14'); + this.checkLength(11,'c.value1 == 10', 'c.value2 != 19'); + this.checkLength(3,'c.value1 == 10', 'c.value2 <= 2'); + this.checkLength(3,'c.value1 < 10', 'c.value2 === 7'); + this.checkLength(12,'c.value1 != 10', 'c.value2 == 8'); + this.checkLength(50,'c.value1 >= 11', 'c.value2 < 5'); + this.checkLength(6,'c.value1 === 11', 'c.value2 < 6'); + this.checkLength(10,'c.value1 != 12', 'c.value2 === 10'); + this.checkLength(132,'c.value1 > 12', 'c.value2 != 12'); + this.checkLength(13,'c.value1 === 12', 'c.value2 != 14'); + this.checkLength(0,'c.value1 === 12', 'c.value2 == 15'); + this.checkLength(0,'c.value1 <= 12', 'c.value2 > 18'); + this.checkLength(204,'c.value1 != 12', 'c.value2 != 6'); + this.checkLength(91,'c.value1 > 13', 'c.value2 <= 12'); + this.checkLength(0,'c.value1 == 13', 'c.value2 >= 17'); + this.checkLength(39,'c.value1 <= 13', 'c.value2 < 3'); + this.checkLength(21,'c.value1 < 13', 'c.value2 >= 7'); + this.checkLength(15,'c.value1 == 14', 'c.value2 != 17'); + this.checkLength(3,'c.value1 > 14', 'c.value2 == 18'); + this.checkLength(1,'c.value1 != 14', 'c.value2 >= 20'); + this.checkLength(119,'c.value1 >= 14', 'c.value2 != 6'); + this.checkLength(15,'c.value1 == 15', 'c.value2 != 3'); + this.checkLength(45,'c.value1 <= 15', 'c.value2 > 6'); + this.checkLength(7,'c.value1 == 15', 'c.value2 < 7'); + this.checkLength(99,'c.value1 < 15', 'c.value2 <= 8'); + this.checkLength(54,'c.value1 >= 15', 'c.value2 <= 8'); + this.checkLength(1,'c.value1 === 16', 'c.value2 == 3'); + this.checkLength(16,'c.value1 === 16', 'c.value2 != 6'); + this.checkLength(152,'c.value1 < 17', 'c.value2 != 16'); + this.checkLength(6,'c.value1 >= 17', 'c.value2 > 17'); + this.checkLength(16,'c.value1 <= 17', 'c.value2 === 2'); + this.checkLength(33,'c.value1 < 17', 'c.value2 < 2'); + this.checkLength(9,'c.value1 <= 18', 'c.value2 === 10'); + this.checkLength(205,'c.value1 != 18', 'c.value2 != 13'); + this.checkLength(171,'c.value1 < 18', 'c.value2 != 20'); + this.checkLength(0,'c.value1 === 18', 'c.value2 > 20'); + this.checkLength(161,'c.value1 < 18', 'c.value2 != 8'); + this.checkLength(2,'c.value1 > 18', 'c.value2 === 8'); + this.checkLength(1,'c.value1 == 19', 'c.value2 === 15'); + this.checkLength(2,'c.value1 >= 19', 'c.value2 == 18'); + this.checkLength(178,'c.value1 < 19', 'c.value2 != 7'); + this.checkLength(7,'c.value1 > 1', 'c.value2 == 14'); + this.checkLength(213,'c.value1 > 1', 'c.value2 <= 15'); + this.checkLength(1,'c.value1 > 1', 'c.value2 == 20'); + this.checkLength(0,'c.value1 == 1', 'c.value2 === 5'); + this.checkLength(55,'c.value1 <= 20', 'c.value2 > 10'); + this.checkLength(5,'c.value1 >= 20', 'c.value2 >= 16'); + this.checkLength(0,'c.value1 != 20', 'c.value2 === 20'); + this.checkLength(9,'c.value1 == 20', 'c.value2 <= 8'); + this.checkLength(10,'c.value1 >= 20', 'c.value2 <= 9'); + this.checkLength(3,'c.value1 > 2', 'c.value2 == 18'); + this.checkLength(10,'c.value1 <= 3', 'c.value2 <= 15'); + this.checkLength(6,'c.value1 < 3', 'c.value2 != 4'); + this.checkLength(17,'c.value1 != 3', 'c.value2 == 4'); + this.checkLength(208,'c.value1 > 3', 'c.value2 != 8'); + this.checkLength(188,'c.value1 > 4', 'c.value2 <= 13'); + this.checkLength(0,'c.value1 < 4', 'c.value2 === 4'); + this.checkLength(101,'c.value1 >= 4', 'c.value2 <= 5'); + this.checkLength(0,'c.value1 == 4', 'c.value2 > 7'); + this.checkLength(205,'c.value1 != 5', 'c.value2 >= 1'); + this.checkLength(150,'c.value1 >= 5', 'c.value2 < 10'); + this.checkLength(6,'c.value1 === 5', 'c.value2 < 14'); + this.checkLength(4,'c.value1 >= 5', 'c.value2 === 17'); + this.checkLength(4,'c.value1 > 5', 'c.value2 === 17'); + this.checkLength(0,'c.value1 <= 5', 'c.value2 == 18'); + this.checkLength(1,'c.value1 === 5', 'c.value2 == 2'); + this.checkLength(215,'c.value1 >= 5', 'c.value2 != 20'); + this.checkLength(15,'c.value1 > 5', 'c.value2 == 3'); + this.checkLength(202,'c.value1 >= 6', 'c.value2 != 13'); + this.checkLength(3,'c.value1 >= 6', 'c.value2 >= 19'); + this.checkLength(150,'c.value1 >= 6', 'c.value2 > 3'); + this.checkLength(7,'c.value1 == 7', 'c.value2 > 0'); + this.checkLength(55,'c.value1 >= 7', 'c.value2 >= 11'); + this.checkLength(55,'c.value1 != 7', 'c.value2 >= 11'); + this.checkLength(0,'c.value1 <= 7', 'c.value2 == 16'); + this.checkLength(0,'c.value1 == 7', 'c.value2 == 20'); + this.checkLength(203,'c.value1 >= 7', 'c.value2 <= 20'); + this.checkLength(5,'c.value1 <= 7', 'c.value2 === 3'); + this.checkLength(14,'c.value1 >= 7', 'c.value2 === 5'); + this.checkLength(36,'c.value1 <= 7', 'c.value2 <= 7'); + this.checkLength(174,'c.value1 > 8', 'c.value2 != 1'); + this.checkLength(9,'c.value1 === 8', 'c.value2 != 10'); + this.checkLength(167,'c.value1 != 8', 'c.value2 < 11'); + this.checkLength(9,'c.value1 === 8', 'c.value2 < 14'); + this.checkLength(0,'c.value1 <= 8', 'c.value2 == 20'); + this.checkLength(0,'c.value1 == 8', 'c.value2 >= 9'); + this.checkLength(4,'c.value1 >= 9', 'c.value2 === 17'); + this.checkLength(55,'c.value1 <= 9', 'c.value2 <= 18'); + this.checkLength(48,'c.value1 >= 9', 'c.value2 <= 3'); + this.checkLength(12,'c.value1 >= 9', 'c.value2 == 5'); + this.checkLength(2,'c.value1 <= 9', 'c.value2 == 8'); + } + +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief executes the test suite +//////////////////////////////////////////////////////////////////////////////// + +jsUnity.run(aqlTestSuite); + +// Local Variables: +// mode: outline-minor +// outline-regexp: "^\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @}\\)" +// End: diff --git a/m4/all-in-one.libev b/m4/all-in-one.libev index c5b2c8268a..31ef0ee4e6 100644 --- a/m4/all-in-one.libev +++ b/m4/all-in-one.libev @@ -6,7 +6,12 @@ dnl ---------------------------------------------------------------------------- LIBEV_CPPFLAGS="-I${srcdir}/3rdParty/libev" LIBEV_LDFLAGS="" -LIBEV_LIBS="${srcdir}/3rdParty/libev/.libs/libev.a" + +if test "x$tr_BITS" = x64; then + LIBEV_LIBS="${srcdir}/3rdParty/libev/ARCH.x64/.libs/libev.a" +else + LIBEV_LIBS="${srcdir}/3rdParty/libev/ARCH.ia32/.libs/libev.a" +fi TRI_LIBEV_VERSION="4.11" diff --git a/m4/all-in-one.v8 b/m4/all-in-one.v8 index 24faca9b4b..194cf21e19 100644 --- a/m4/all-in-one.v8 +++ b/m4/all-in-one.v8 @@ -8,7 +8,11 @@ V8_CPPFLAGS="-I${srcdir}/3rdParty/V8/include" V8_LDFLAGS="" if test "x$tr_DARWIN" == xyes; then - V8_LIBS="${srcdir}/3rdParty/V8/libv8.a" + if test "x$tr_BITS" == x64; then + V8_LIBS="${srcdir}/3rdParty/V8/libv8_x64.a" + else + V8_LIBS="${srcdir}/3rdParty/V8/libv8_ia32.a" + fi else if test "x$tr_BITS" == x64; then V8_LIBS="${srcdir}/3rdParty/V8/out/x64.release/obj.target/tools/gyp/libv8_base.a ${srcdir}/3rdParty/V8/out/x64.release/obj.target/tools/gyp/libv8_nosnapshot.a" diff --git a/m4/configure.32bit b/m4/configure.32bit index 02c02f4bfb..5da22248bc 100644 --- a/m4/configure.32bit +++ b/m4/configure.32bit @@ -5,6 +5,7 @@ dnl option for 32bit/64bit compile dnl ----------------------------------------------------------------------------------------- tr_BITS=32 +tr_BITS_32=no case $target_cpu in x86_64*) @@ -16,30 +17,27 @@ if test "x$tr_BITS" == "x64"; then AC_ARG_ENABLE(32bit, AS_HELP_STRING([--enable-32bit], [force 32bit compilation (default: no)]), - tr_32BIT="$enableval" - if test "x$enableval" = xyes; then CXXFLAGS="$CXXFLAGS -m32" CFLAGS="$CFLAGS -m32" LDFLAGS="$LDFLAGS -m32" + + tr_BITS=32 + tr_BITS_32=yes fi, - tr_32BIT="no" ) fi AM_CONDITIONAL(ENABLE_64BIT, test "x$tr_BITS" = x64) AM_CONDITIONAL(ENABLE_32BIT, test "x$tr_BITS" = x32) +AM_CONDITIONAL(ENABLE_FORCE_32BIT, test "x$tr_BITS_32" = xyes) dnl ----------------------------------------------------------------------------------------- dnl informational output dnl ----------------------------------------------------------------------------------------- -if test "x$tr_BITS" == "x64"; then - if test "x$tr_32BIT" = xyes; then - BASIC_INFO="$BASIC_INFO|32bit: enabled" - else - BASIC_INFO="$BASIC_INFO|64bit: enabled" - fi -else +if test "x$tr_32BIT" = xyes; then BASIC_INFO="$BASIC_INFO|32bit: enabled" +else + BASIC_INFO="$BASIC_INFO|64bit: enabled" fi diff --git a/m4/configure.basics b/m4/configure.basics index 8c701f7dd5..a3a63a28ab 100644 --- a/m4/configure.basics +++ b/m4/configure.basics @@ -87,8 +87,21 @@ if test x$GCC == xyes; then WALL="${WALL} -Werror" fi + if test x$tr_DARWIN == xyes; then + WALL="${WALL} -Wno-deprecated-declarations" + fi + WALLC="${WALL} -Wshadow -Wstrict-prototypes -Wdeclaration-after-statement" - WALLCXX="${WALL} -Wstrict-null-sentinel -Woverloaded-virtual -Wno-variadic-macros" + WALLCXX="${WALL} -Woverloaded-virtual -Wno-variadic-macros" + + case $CXX in + *clang++*) + ;; + + *) + WALLCXX="${WALLCXX} -Wstrict-null-sentinel" + ;; + esac if test x$tr_WEFFCXX == xyes; then WALLCXX="${WALLCXX} -Weffc++" diff --git a/m4/configure.memory b/m4/configure.memory new file mode 100644 index 0000000000..5a0851ac0e --- /dev/null +++ b/m4/configure.memory @@ -0,0 +1,27 @@ +dnl -*- mode: Autoconf; -*- + +dnl ----------------------------------------------------------------------------------------- +dnl option for memory failures +dnl ----------------------------------------------------------------------------------------- + +AC_ARG_ENABLE(memfail, + AS_HELP_STRING([--enable-memfail], [enables memory allocation failures (default: no)]), + tr_MEMFAIL="${enableval:-yes}", + tr_MEMFAIL=no +) + +if test "x$tr_MEMFAIL" = xyes; then + AC_DEFINE_UNQUOTED(TRI_ENABLE_MEMFAIL, 1, [true if memory allocation failures are enabled]) +fi + +AM_CONDITIONAL(ENABLE_MEMFAIL, test "x$tr_MEMFAIL" = xyes) + +dnl ----------------------------------------------------------------------------------------- +dnl informational output +dnl ----------------------------------------------------------------------------------------- + +if test "x$tr_MEMFAIL" = xyes; then + BASIC_INFO="$BASIC_INFO|MEMFAIL: enabled" +else + BASIC_INFO="$BASIC_INFO|MEMFAIL: disabled" +fi