28 #if !defined(WITHOUT_FASTBIT_CONFIG_H) && !defined(__MINGW32__) && !defined(_MSC_VER)
29 #include "fastbit-config.h"
31 #if defined(HAVE_SYS_TYPES_H) || defined(__PGI)
32 # include <sys/types.h>
34 #if defined(HAVE_INTTYPES_H) || defined(__sun) || defined(__MINGW32__) || defined(__FreeBSD__)
35 # include <inttypes.h>
36 #elif defined(HAVE_STDINT_H) || defined(__unix__) || defined(__APPLE__)
38 #elif defined(_WIN32) && defined(_MSC_VER)
41 # define int16_t __int16
44 # define uint16_t unsigned __int16
47 # define int32_t __int32
50 # define uint32_t unsigned __int32
53 # define int64_t __int64
56 # define uint64_t unsigned __int64
59 #error Do NOT know how to find the exact width data types!
62 #if defined(_WIN32) && (defined(_MSC_VER) || defined(__MINGW32__))
63 # if defined(_USRDLL) || defined(CXX_USE_DLL)
64 # if defined(DLL_EXPORT)
65 # define FASTBIT_DLLSPEC __declspec(dllexport)
67 # define FASTBIT_DLLSPEC __declspec(dllimport)
70 # define FASTBIT_DLLSPEC
73 # define FASTBIT_DLLSPEC
88 const char *indexOptions);
94 const char *indexOptions);
106 FASTBIT_DLLSPEC FastBitQueryHandle
108 const char *queryConditions);
122 (FastBitQueryHandle, uint32_t *);
125 FASTBIT_DLLSPEC
const char*
128 FASTBIT_DLLSPEC
const char*
131 FASTBIT_DLLSPEC
const char*
144 FASTBIT_DLLSPEC
const float*
145 fastbit_get_qualified_floats(FastBitQueryHandle query,
147 FASTBIT_DLLSPEC
const double*
148 fastbit_get_qualified_doubles(FastBitQueryHandle query,
150 FASTBIT_DLLSPEC
const signed char*
151 fastbit_get_qualified_bytes(FastBitQueryHandle query,
153 FASTBIT_DLLSPEC
const int16_t*
154 fastbit_get_qualified_shorts(FastBitQueryHandle query,
156 FASTBIT_DLLSPEC
const int32_t*
157 fastbit_get_qualified_ints(FastBitQueryHandle query,
159 FASTBIT_DLLSPEC
const int64_t*
160 fastbit_get_qualified_longs(FastBitQueryHandle query,
162 FASTBIT_DLLSPEC
const unsigned char*
163 fastbit_get_qualified_ubytes(FastBitQueryHandle query,
165 FASTBIT_DLLSPEC
const uint16_t*
166 fastbit_get_qualified_ushorts(FastBitQueryHandle query,
168 FASTBIT_DLLSPEC
const uint32_t*
169 fastbit_get_qualified_uints(FastBitQueryHandle query,
171 FASTBIT_DLLSPEC
const uint64_t*
172 fastbit_get_qualified_ulongs(FastBitQueryHandle query,
174 FASTBIT_DLLSPEC
const char**
175 fastbit_get_qualified_strings(FastBitQueryHandle query,
183 struct FastBitResultSet;
188 FASTBIT_DLLSPEC FastBitResultSetHandle
202 FASTBIT_DLLSPEC
unsigned
206 FASTBIT_DLLSPEC int64_t
211 FASTBIT_DLLSPEC
float
216 FASTBIT_DLLSPEC
double
220 FASTBIT_DLLSPEC
const char*
227 FASTBIT_DLLSPEC int32_t
231 FASTBIT_DLLSPEC uint32_t
235 FASTBIT_DLLSPEC int64_t
240 FASTBIT_DLLSPEC
float
245 FASTBIT_DLLSPEC
double
249 FASTBIT_DLLSPEC
const char*
260 void *vals, uint32_t nelem, uint32_t start);
FILE * fastbit_get_logfilepointer()
Return the file pointer to the log file.
Definition: capi.cpp:1953
int fastbit_result_set_next_bundle(FastBitResultSetHandle)
Returns 0 if there are more bundles, otherwise returns -1.
Definition: capi.cpp:2086
uint32_t fastbit_result_set_getUnsigned(FastBitResultSetHandle rset, unsigned position)
Get the value of the named column as an unsigned integer.
Definition: capi.cpp:2327
double fastbit_result_set_getDouble(FastBitResultSetHandle rset, unsigned position)
Get the value of the named column as a double-precision floating-point number.
Definition: capi.cpp:2417
int fastbit_get_version_number()
Return the software version as an integer.
Definition: capi.cpp:226
int fastbit_set_verbose_level(int v)
Change the verboseness of FastBit functions.
Definition: capi.cpp:1911
int fastbit_get_result_columns(FastBitQueryHandle query)
Count the number of columns selected in the select clause of the query.
Definition: capi.cpp:762
const char * fastbit_get_logfile()
Find out the name of the current log file.
Definition: capi.cpp:1949
int64_t fastbit_result_set_get_long(FastBitResultSetHandle rset, const char *cname)
Get the value of the named column as a long.
Definition: capi.cpp:2175
int fastbit_result_set_next(FastBitResultSetHandle)
Returns 0 if there are more results, otherwise returns -1.
Definition: capi.cpp:2055
int fastbit_purge_index(const char *indexLocation, const char *cname)
Purge the index of the named attribute.
Definition: capi.cpp:364
const char * fastbit_result_set_get_string(FastBitResultSetHandle rset, const char *cname)
Get the value of the named column as a string.
Definition: capi.cpp:2262
void fastbit_cleanup(void)
Clean up resources hold by FastBit file manager.
Definition: capi.cpp:1877
double fastbit_read_clock()
Read the system's wallclock timer.
Definition: capi.cpp:1959
double fastbit_result_set_get_double(FastBitResultSetHandle rset, const char *cname)
Get the value of the named column as a double-precision floating-point number.
Definition: capi.cpp:2233
int32_t fastbit_result_set_getInt(FastBitResultSetHandle rset, unsigned position)
Get the value of the named column as an integer.
Definition: capi.cpp:2297
int fastbit_get_verbose_level(void)
Return the current verboseness level.
Definition: capi.cpp:1917
int fastbit_destroy_query(FastBitQueryHandle query)
Free all resource associated with the handle.
Definition: capi.cpp:547
int fastbit_get_result_row_ids(FastBitQueryHandle, uint32_t *)
Retrieve the row number of those satisfying the query conditions.
Definition: capi.cpp:670
struct FastBitQuery * FastBitQueryHandle
A handle to be used by C clients.
Definition: capi.h:103
unsigned fastbit_result_set_get_unsigned(FastBitResultSetHandle rset, const char *cname)
Get the value of the named column as an unsigned integer.
Definition: capi.cpp:2146
int fastbit_reorder_partition(const char *dir)
Reorder all the columns in the partition.
Definition: capi.cpp:419
FastBitResultSetHandle fastbit_build_result_set(FastBitQueryHandle query)
Build a new result set from a query object.
Definition: capi.cpp:2002
int fastbit_add_values(const char *colname, const char *coltype, void *vals, uint32_t nelem, uint32_t start)
Add nelem values of the specified column (colname) to the in-memory buffer.
Definition: capi.cpp:2567
void fastbit_init(const char *rcfile)
Initialization function.
Definition: capi.cpp:1852
const char * fastbit_get_version_string()
Return the software version as a string.
Definition: capi.cpp:230
int fastbit_rows_in_partition(const char *dir)
Return the number of rows in the data partition.
Definition: capi.cpp:2665
int fastbit_result_set_get_int(FastBitResultSetHandle rset, const char *cname)
Get the value of the named column as an integer.
Definition: capi.cpp:2117
int64_t fastbit_result_set_getLong(FastBitResultSetHandle rset, unsigned position)
Get the value of the named column as a long.
Definition: capi.cpp:2357
int fastbit_columns_in_partition(const char *dir)
Return the number of columns in the data partition.
Definition: capi.cpp:2679
const char * fastbit_result_set_getString(FastBitResultSetHandle rset, unsigned position)
Get the value of the named column as a string.
Definition: capi.cpp:2447
int fastbit_flush_buffer(const char *dir)
Flush the in-memory data to the named directory.
Definition: capi.cpp:2488
const char * fastbit_get_where_clause(FastBitQueryHandle query)
Return the where clause of the query.
Definition: capi.cpp:789
float fastbit_result_set_getFloat(FastBitResultSetHandle rset, unsigned position)
Get the value of the named column as a single-precision floating-point number.
Definition: capi.cpp:2387
float fastbit_result_set_get_float(FastBitResultSetHandle rset, const char *cname)
Get the value of the named column as a single-precision floating-point number.
Definition: capi.cpp:2204
int fastbit_purge_indexes(const char *indexLocation)
Purge all index files.
Definition: capi.cpp:273
FastBitQueryHandle fastbit_build_query(const char *selectClause, const char *indexLocation, const char *queryConditions)
Build a new FastBit query.
Definition: capi.cpp:468
int fastbit_get_result_rows(FastBitQueryHandle query)
Retrieve the number of hits in the query.
Definition: capi.cpp:726
int fastbit_set_logfile(const char *filename)
Change the name of the log file.
Definition: capi.cpp:1923
int fastbit_build_indexes(const char *indexLocation, const char *indexOptions)
Build indexes for all columns in the named directory.
Definition: capi.cpp:234
const char * fastbit_get_from_clause(FastBitQueryHandle query)
Return the table name.
Definition: capi.cpp:780
int fastbit_build_index(const char *indexLocation, const char *cname, const char *indexOptions)
Build an index for the named attribute.
Definition: capi.cpp:308
struct FastBitResultSet * FastBitResultSetHandle
A handle to identify a set of query results.
Definition: capi.h:185
const char * fastbit_get_select_clause(FastBitQueryHandle query)
Return the string form of the select clause.
Definition: capi.cpp:771
int fastbit_destroy_result_set(FastBitResultSetHandle rset)
Destroy a result set.
Definition: capi.cpp:2048