mirror of https://gitee.com/bigwinds/arangodb
121 lines
3.9 KiB
C
121 lines
3.9 KiB
C
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief order by
|
|
///
|
|
/// @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_ORDER_H
|
|
#define TRIAGENS_DURHAM_VOC_BASE_ORDER_H 1
|
|
|
|
#include "VocBase/vocbase.h"
|
|
#include "VocBase/select-result.h"
|
|
#include "VocBase/context.h"
|
|
#include "V8/v8-c-utils.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @addtogroup VocBase
|
|
/// @{
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief order by types
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
typedef enum {
|
|
TRI_QRY_ORDER_GENERAL
|
|
}
|
|
TRI_qry_order_type_e;
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief abstract order by clause
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
typedef struct TRI_qry_order_s {
|
|
TRI_qry_order_type_e _type;
|
|
|
|
struct TRI_qry_order_s* (*clone) (struct TRI_qry_order_s const*);
|
|
void (*free) (struct TRI_qry_order_s*);
|
|
}
|
|
TRI_qry_order_t;
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief abstract order by clause for conditions
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
typedef struct TRI_qry_order_cond_s {
|
|
TRI_qry_order_t base;
|
|
}
|
|
TRI_qry_order_cond_t;
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief JavaScript order by clause
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
typedef struct TRI_qry_order_general_s {
|
|
TRI_qry_order_cond_t base;
|
|
|
|
char* _code;
|
|
}
|
|
TRI_qry_order_general_t;
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief Order by function typedef
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
typedef void (*TRI_order_fptr_t) (TRI_rc_result_t*,
|
|
TRI_qry_order_t*);
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief General order by function (uses JavaScript code)
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void TRI_OrderDataGeneralQuery (TRI_rc_result_t*,
|
|
TRI_qry_order_t*);
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @brief creates an order by clause for general JavaScript code
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
TRI_qry_order_t* TRI_CreateQueryOrderGeneral (char const*);
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
/// @}
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
// Local Variables:
|
|
// mode: outline-minor
|
|
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"
|
|
// End:
|
|
|