quasardb C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Typedefs | Enumerations | Functions
Query related functions

Data Structures

struct  qdb_point_result_t
 A variadic structure holding the result type as well as the result value. More...
 
struct  qdb_query_result_t
 Holds the result of a query. More...
 
struct  qdb_query_experimental_column_t
 Holds a column of an experimental query. More...
 
struct  qdb_query_experimental_result_t
 Holds the result of an experimental query. More...
 

Typedefs

typedef enum
qdb_query_result_value_type_t 
qdb_query_result_value_type_t
 The type of a result.
 

Enumerations

enum  qdb_query_result_value_type_t
 The type of a result.
 

Functions

QDB_API_LINKAGE qdb_error_t qdb_query_find (qdb_handle_t handle, const char *query, const char ***aliases, size_t *alias_count)
 Retrieves all entries' aliases that match the specified find query. More...
 
QDB_API_LINKAGE qdb_error_t qdb_query (qdb_handle_t handle, const char *query, qdb_query_result_t **result)
 Run the provided query and creates a table directory with the results. More...
 
QDB_API_LINKAGE qdb_error_t qdb_query_experimental (qdb_handle_t handle, const char *query, qdb_query_experimental_result_t **result)
 Run the provided query to return a table. More...
 

Detailed Description

Function Documentation

QDB_API_LINKAGE qdb_error_t qdb_query ( qdb_handle_t  handle,
const char *  query,
qdb_query_result_t **  result 
)

Run the provided query and creates a table directory with the results.

For the complete grammar, please refer to the documentation.

Queries are transactional.

The complexity of this function is dependent on the complexity of the query.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
queryA pointer to a null-terminated UTF-8 string representing the query to perform.
[out]resultA pointer to a pointer of qdb_query_result_t that will receive the results. It must be released later with qdb_release.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_release
QDB_API_LINKAGE qdb_error_t qdb_query_experimental ( qdb_handle_t  handle,
const char *  query,
qdb_query_experimental_result_t **  result 
)

Run the provided query to return a table.

Currently only supports querying some columns of a timeseries.

Queries are transactional.

The complexity of this function is dependent on the complexity of the query.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
queryA pointer to a null-terminated UTF-8 string representing the query to perform.
[out]resultA pointer to a pointer of qdb_query_result_t that will receive the results. It must be released later with qdb_release.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_release
Warning
This function is still under development. Performance and compatibility are not guaranteed.
QDB_API_LINKAGE qdb_error_t qdb_query_find ( qdb_handle_t  handle,
const char *  query,
const char ***  aliases,
size_t *  alias_count 
)

Retrieves all entries' aliases that match the specified find query.

For the complete grammar, please refer to the documentation.

Queries are transactional.

The complexity of this function is dependent on the complexity of the query.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
queryA pointer to a null-terminated UTF-8 string representing the query to perform.
[out]aliasesA pointer to an array of null-terminated UTF-8 string that will list the aliases of the entries matching the query.
[out]alias_countA pointer to an integer that will receive the number of returned aliases.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_release