preludedb-plugin-sql: libpreludedb Reference Manual

## preludedb-plugin-sql preludedb-plugin-sql |

## Functions

const char * | (*preludedb_plugin_sql_get_column_name_func_t) ()
const char * | (*preludedb_plugin_sql_get_operator_string_func_t) ()
int | (*preludedb_plugin_sql_build_constraint_string_func_t) ()
int | (*preludedb_plugin_sql_unescape_binary_func_t) ()
int | (*preludedb_plugin_sql_escape_binary_func_t) ()
int | (*preludedb_plugin_sql_query_func_t) ()
int | (*preludedb_plugin_sql_get_column_num_func_t) ()
int | (*preludedb_plugin_sql_build_timestamp_string_func_t) ()
int | (*preludedb_plugin_sql_build_limit_offset_string_func_t) ()
void | preludedb_plugin_sql_set_build_timestamp_string_func ()
int | (*preludedb_plugin_sql_build_time_interval_string_func_t) ()
int | (*preludedb_plugin_sql_open_func_t) ()
int | (*preludedb_plugin_sql_fetch_field_func_t) ()
void | preludedb_plugin_sql_set_get_operator_string_func ()
void | (*preludedb_plugin_sql_close_func_t) ()
int | (*preludedb_plugin_sql_build_time_constraint_string_func_t) ()
int | (*preludedb_plugin_sql_escape_func_t) ()
int | (*preludedb_plugin_sql_fetch_row_func_t) ()
int | preludedb_plugin_sql_new ()
void | preludedb_plugin_sql_set_open_func ()
void | preludedb_plugin_sql_set_close_func ()
void | preludedb_plugin_sql_set_escape_func ()
void | preludedb_plugin_sql_set_escape_binary_func ()
void | preludedb_plugin_sql_set_unescape_binary_func ()
void | preludedb_plugin_sql_set_query_func ()
void | preludedb_plugin_sql_set_get_column_count_func ()
void | preludedb_plugin_sql_set_get_row_count_func ()
void | preludedb_plugin_sql_set_get_column_name_func ()
void | preludedb_plugin_sql_set_get_column_num_func ()
void | preludedb_plugin_sql_set_fetch_row_func ()
void | preludedb_plugin_sql_set_fetch_field_func ()
void | preludedb_plugin_sql_set_build_time_constraint_string_func ()
void | preludedb_plugin_sql_set_build_time_interval_string_func ()
void | preludedb_plugin_sql_set_build_limit_offset_string_func ()
void | preludedb_plugin_sql_set_build_constraint_string_func ()

## Types and Values

typedef | preludedb_plugin_sql_t

## Description

## Functions

### preludedb_plugin_sql_get_column_name_func_t ()

    const char *
    (*preludedb_plugin_sql_get_column_name_func_t)
                                   (void *session,
                                    preludedb_sql_table_t *table,
                                    unsigned int column_num);

### preludedb_plugin_sql_get_operator_string_func_t ()

    const char *
    (*preludedb_plugin_sql_get_operator_string_func_t)
                                   (idmef_criterion_operator_t operator);

### preludedb_plugin_sql_build_constraint_string_func_t ()

    int
    (*preludedb_plugin_sql_build_constraint_string_func_t)
                                   (void *session,
                                    prelude_string_t *out,
                                    const char *field,
                                    idmef_criterion_operator_t operator,
                                    const char *value);

### preludedb_plugin_sql_unescape_binary_func_t ()

    int
    (*preludedb_plugin_sql_unescape_binary_func_t)
                                   (void *session,
                                    const char *input,
                                    unsigned char **output,
                                    size_t *output_size);

### preludedb_plugin_sql_escape_binary_func_t ()

    int
    (*preludedb_plugin_sql_escape_binary_func_t)
                                   (void *session,
                                    const unsigned char *input,
                                    size_t input_size,
                                    char **output);

### preludedb_plugin_sql_query_func_t ()

    int
    (*preludedb_plugin_sql_query_func_t) (void *session,
                                          const char *query,
                                          preludedb_sql_table_t **res);

### preludedb_plugin_sql_get_column_num_func_t ()

    int
    (*preludedb_plugin_sql_get_column_num_func_t)
                                   (void *session,
                                    preludedb_sql_table_t *table,
                                    const char *column_name);

### preludedb_plugin_sql_build_timestamp_string_func_t ()

    int
    (*preludedb_plugin_sql_build_timestamp_string_func_t)
                                   (void *session,
                                    const struct tm *t,
                                    char *out,
                                    size_t size);

### preludedb_plugin_sql_build_limit_offset_string_func_t ()

    int
    (*preludedb_plugin_sql_build_limit_offset_string_func_t)
                                   (void *session,
                                    int limit,
                                    int offset,
                                    prelude_string_t *output);

### preludedb_plugin_sql_set_build_timestamp_string_func ()

    void
    preludedb_plugin_sql_set_build_timestamp_string_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_build_timestamp_string_func_t func);

### preludedb_plugin_sql_build_time_interval_string_func_t ()

    int
    (*preludedb_plugin_sql_build_time_interval_string_func_t)
                                   (void *session,
                                    prelude_string_t *output,
                                    const char *field,
                                    const char *value,
                                    preludedb_selected_object_interval_t unit);

### preludedb_plugin_sql_open_func_t ()

    int
    (*preludedb_plugin_sql_open_func_t) (preludedb_sql_settings_t *settings,
                                         void **session);

### preludedb_plugin_sql_fetch_field_func_t ()

    int
    (*preludedb_plugin_sql_fetch_field_func_t)
                                   (void *session,
                                    preludedb_sql_table_t *table,
                                    preludedb_sql_row_t *row,
                                    unsigned int column_num,
                                    preludedb_sql_field_t **field);

### preludedb_plugin_sql_set_get_operator_string_func ()

    void
    preludedb_plugin_sql_set_get_operator_string_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_get_operator_string_func_t func);

### preludedb_plugin_sql_close_func_t ()

    void
    (*preludedb_plugin_sql_close_func_t) (void *session);

### preludedb_plugin_sql_build_time_constraint_string_func_t ()

    int
    (*preludedb_plugin_sql_build_time_constraint_string_func_t)
                                   (void *session,
                                    prelude_string_t *output,
                                    const char *field,
                                    preludedb_sql_time_constraint_type_t type,
                                    idmef_criterion_operator_t operator,
                                    int value,
                                    int gmt_offset);

### preludedb_plugin_sql_escape_func_t ()

    int
    (*preludedb_plugin_sql_escape_func_t) (void *session,
                                           const char *input,
                                           size_t input_size,
                                           char **output);

### preludedb_plugin_sql_fetch_row_func_t ()

    int
    (*preludedb_plugin_sql_fetch_row_func_t)
                                   (void *session,
                                    preludedb_sql_table_t *table,
                                    unsigned int row_index,
                                    preludedb_sql_row_t **row);

### preludedb_plugin_sql_new ()

    int
    preludedb_plugin_sql_new (preludedb_plugin_sql_t **plugin);

### preludedb_plugin_sql_set_open_func ()

    void
    preludedb_plugin_sql_set_open_func (preludedb_plugin_sql_t *plugin,
                                        preludedb_plugin_sql_open_func_t func);

### preludedb_plugin_sql_set_close_func ()

    void
    preludedb_plugin_sql_set_close_func (preludedb_plugin_sql_t *plugin,
                                         preludedb_plugin_sql_close_func_t func);

### preludedb_plugin_sql_set_escape_func ()

    void
    preludedb_plugin_sql_set_escape_func (preludedb_plugin_sql_t *plugin,
                                          preludedb_plugin_sql_escape_func_t func);

### preludedb_plugin_sql_set_escape_binary_func ()

    void
    preludedb_plugin_sql_set_escape_binary_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_escape_binary_func_t func);

### preludedb_plugin_sql_set_unescape_binary_func ()

    void
    preludedb_plugin_sql_set_unescape_binary_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_unescape_binary_func_t func);

### preludedb_plugin_sql_set_query_func ()

    void
    preludedb_plugin_sql_set_query_func (preludedb_plugin_sql_t *plugin,
                                         preludedb_plugin_sql_query_func_t func);

### preludedb_plugin_sql_set_get_column_count_func ()

    void
    preludedb_plugin_sql_set_get_column_count_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_get_column_count_func_t func);

### preludedb_plugin_sql_set_get_row_count_func ()

    void
    preludedb_plugin_sql_set_get_row_count_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_get_row_count_func_t func);

### preludedb_plugin_sql_set_get_column_name_func ()

    void
    preludedb_plugin_sql_set_get_column_name_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_get_column_name_func_t func);

### preludedb_plugin_sql_set_get_column_num_func ()

    void
    preludedb_plugin_sql_set_get_column_num_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_get_column_num_func_t func);

### preludedb_plugin_sql_set_fetch_row_func ()

    void
    preludedb_plugin_sql_set_fetch_row_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_fetch_row_func_t func);

### preludedb_plugin_sql_set_fetch_field_func ()

    void
    preludedb_plugin_sql_set_fetch_field_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_fetch_field_func_t func);

### preludedb_plugin_sql_set_build_time_constraint_string_func ()

    void
    preludedb_plugin_sql_set_build_time_constraint_string_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_build_time_constraint_string_func_t func);

### preludedb_plugin_sql_set_build_time_interval_string_func ()

    void
    preludedb_plugin_sql_set_build_time_interval_string_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_build_time_interval_string_func_t func);

### preludedb_plugin_sql_set_build_limit_offset_string_func ()

    void
    preludedb_plugin_sql_set_build_limit_offset_string_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_build_limit_offset_string_func_t func);

### preludedb_plugin_sql_set_build_constraint_string_func ()

    void
    preludedb_plugin_sql_set_build_constraint_string_func
                                   (preludedb_plugin_sql_t *plugin,
                                    preludedb_plugin_sql_build_constraint_string_func_t func);

## Types and Values

### preludedb_plugin_sql_t

    typedef struct preludedb_plugin_sql preludedb_plugin_sql_t;