upscaledb  2.1.13
upscaledb_uqi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2016 Christoph Rupp (chris@crupp.de).
3  * All Rights Reserved.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * See the file COPYING for License information.
16  */
17 
27 #ifndef UPS_UPSCALEDB_OLA_H
28 #define UPS_UPSCALEDB_OLA_H
29 
30 #include <ups/upscaledb.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
42 typedef struct {
44  ups_bool_t (*predicate_func)(const void *key_data, uint16_t key_size,
45  void *context);
46 
48  void *context;
49 
51 
52 
60 typedef struct {
61  union {
64 
66  double result_double;
67  } u;
68 
70  int type;
71 
72 } uqi_result_t;
73 
74 
88 uqi_count(ups_db_t *db, ups_txn_t *txn, uqi_result_t *result);
89 
106  uqi_result_t *result);
107 
122 
139  uqi_bool_predicate_t *pred, uqi_result_t *result);
140 
162 uqi_average(ups_db_t *db, ups_txn_t *txn, uqi_result_t *result);
163 
187  uqi_result_t *result);
188 
210 uqi_sum(ups_db_t *db, ups_txn_t *txn, uqi_result_t *result);
211 
235  uqi_result_t *result);
236 
241 #ifdef __cplusplus
242 } // extern "C"
243 #endif
244 
245 #endif /* UPS_UPSCALEDB_OLA_H */
struct ups_txn_t ups_txn_t
Definition: upscaledb.h:1147
int ups_bool_t
Definition: types.h:131
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_sum_if(ups_db_t *db, ups_txn_t *txn, uqi_bool_predicate_t *pred, uqi_result_t *result)
unsigned short uint16_t
Definition: msstdint.h:84
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_average_if(ups_db_t *db, ups_txn_t *txn, uqi_bool_predicate_t *pred, uqi_result_t *result)
unsigned __int64 uint64_t
Definition: msstdint.h:95
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_count_distinct(ups_db_t *db, ups_txn_t *txn, uqi_result_t *result)
uint64_t result_u64
Definition: upscaledb_uqi.h:63
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_count_if(ups_db_t *db, ups_txn_t *txn, uqi_bool_predicate_t *pred, uqi_result_t *result)
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_count(ups_db_t *db, ups_txn_t *txn, uqi_result_t *result)
Include file for upscaledb embedded database.
struct ups_db_t ups_db_t
Definition: upscaledb.h:154
#define UPS_CALLCONV
Definition: types.h:97
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_count_distinct_if(ups_db_t *db, ups_txn_t *txn, uqi_bool_predicate_t *pred, uqi_result_t *result)
#define UPS_EXPORT
Definition: types.h:89
int ups_status_t
Definition: types.h:138
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_average(ups_db_t *db, ups_txn_t *txn, uqi_result_t *result)
double result_double
Definition: upscaledb_uqi.h:66
UPS_EXPORT ups_status_t UPS_CALLCONV uqi_sum(ups_db_t *db, ups_txn_t *txn, uqi_result_t *result)