1
0
Fork 0
arangodb/arangod/VocBase/voc-types.h

166 lines
6.0 KiB
C

////////////////////////////////////////////////////////////////////////////////
/// @brief vocbase types
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2004-2013 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-2013, triAGENS GmbH, Cologne, Germany
////////////////////////////////////////////////////////////////////////////////
#ifndef TRIAGENS_VOC_BASE_VOC_TYPES_H
#define TRIAGENS_VOC_BASE_VOC_TYPES_H 1
#include "BasicsC/common.h"
#ifdef __cplusplus
extern "C" {
#endif
// -----------------------------------------------------------------------------
// --SECTION-- public defines
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup VocBase
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief collection meta info filename
////////////////////////////////////////////////////////////////////////////////
#define TRI_VOC_PARAMETER_FILE "parameter.json"
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
// --SECTION-- public types
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @addtogroup VocBase
/// @{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/// @brief tick type (48bit)
////////////////////////////////////////////////////////////////////////////////
typedef uint64_t TRI_voc_tick_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief collection identifier type
////////////////////////////////////////////////////////////////////////////////
typedef uint64_t TRI_voc_cid_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief datafile identifier type
////////////////////////////////////////////////////////////////////////////////
typedef uint64_t TRI_voc_fid_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief document key identifier type
////////////////////////////////////////////////////////////////////////////////
typedef char* TRI_voc_key_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief revision identifier type
////////////////////////////////////////////////////////////////////////////////
typedef uint64_t TRI_voc_rid_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief transaction identifier type
////////////////////////////////////////////////////////////////////////////////
typedef uint64_t TRI_voc_tid_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief size type
////////////////////////////////////////////////////////////////////////////////
typedef uint32_t TRI_voc_size_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief signed size type
////////////////////////////////////////////////////////////////////////////////
typedef int32_t TRI_voc_ssize_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief index identifier
////////////////////////////////////////////////////////////////////////////////
typedef TRI_voc_tick_t TRI_idx_iid_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief crc type
////////////////////////////////////////////////////////////////////////////////
typedef uint32_t TRI_voc_crc_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief collection storage type
////////////////////////////////////////////////////////////////////////////////
typedef uint32_t TRI_col_type_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief server id type
////////////////////////////////////////////////////////////////////////////////
typedef uint64_t TRI_server_id_t;
////////////////////////////////////////////////////////////////////////////////
/// @brief enum for write operations
////////////////////////////////////////////////////////////////////////////////
typedef enum {
TRI_VOC_DOCUMENT_OPERATION_INSERT = 1,
TRI_VOC_DOCUMENT_OPERATION_UPDATE,
TRI_VOC_DOCUMENT_OPERATION_REMOVE
}
TRI_voc_document_operation_e;
////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------
#endif
// Local Variables:
// mode: outline-minor
// outline-regexp: "/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|/// @page\\|// --SECTION--\\|/// @\\}"
// End: