All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
rlm_sql_firebird.c File Reference
#include "sql_fbapi.h"
#include <freeradius-devel/rad_assert.h>
+ Include dependency graph for rlm_sql_firebird.c:

Go to the source code of this file.

Functions

static int _sql_socket_destructor (rlm_sql_firebird_conn_t *conn)
 
static int sql_affected_rows (rlm_sql_handle_t *handle, rlm_sql_config_t *config)
 
static int sql_affected_rows (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 Return the number of rows affected by the query (update, or insert) More...
 
static size_t sql_error (UNUSED TALLOC_CTX *ctx, sql_log_entry_t out[], size_t outlen, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 Retrieves any errors associated with the connection handle. More...
 
static sql_rcode_t sql_fetch_row (rlm_sql_row_t *out, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 Returns an individual row. More...
 
static sql_rcode_t sql_fields (char const **out[], rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 Returns name of fields. More...
 
static sql_rcode_t sql_finish_query (rlm_sql_handle_t *handle, rlm_sql_config_t *config)
 End the query. More...
 
static sql_rcode_t sql_finish_select_query (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 End the select query, such as freeing memory or result. More...
 
static sql_rcode_t sql_free_result (rlm_sql_handle_t *handle, rlm_sql_config_t *config)
 
static sql_rcode_t sql_free_result (UNUSED rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 Frees memory allocated for a result set. More...
 
static int sql_num_fields (rlm_sql_handle_t *handle, rlm_sql_config_t *config)
 
static int sql_num_fields (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
 Returns number of columns from query. More...
 
static int sql_num_rows (rlm_sql_handle_t *handle, rlm_sql_config_t *config)
 Returns number of rows in query. More...
 
static sql_rcode_t sql_query (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config, char const *query)
 Issue a non-SELECT query (ie: update/delete/insert) to the database. More...
 
static sql_rcode_t sql_select_query (rlm_sql_handle_t *handle, rlm_sql_config_t *config, char const *query)
 Issue a select query to the database. More...
 
static sql_rcode_t sql_socket_init (rlm_sql_handle_t *handle, rlm_sql_config_t *config, UNUSED struct timeval const *timeout)
 Establish connection to the db. More...
 

Variables

rlm_sql_module_t rlm_sql_firebird
 

Function Documentation

static int _sql_socket_destructor ( rlm_sql_firebird_conn_t conn)
static

Definition at line 34 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int sql_affected_rows ( rlm_sql_handle_t handle,
rlm_sql_config_t config 
)
static

+ Here is the caller graph for this function:

static int sql_affected_rows ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Return the number of rows affected by the query (update, or insert)

Definition at line 298 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

static size_t sql_error ( UNUSED TALLOC_CTX *  ctx,
sql_log_entry_t  out[],
size_t  outlen,
rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Retrieves any errors associated with the connection handle.

Note
Caller will free any memory allocated in ctx.
Parameters
ctxto allocate temporary error buffers in.
outArray of sql_log_entrys to fill.
outlenLength of out array.
handlerlm_sql connection handle.
configrlm_sql config.
Returns
number of errors written to the sql_log_entry_t array.

Definition at line 279 of file rlm_sql_firebird.c.

static sql_rcode_t sql_fetch_row ( rlm_sql_row_t out,
rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Returns an individual row.

Definition at line 210 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_fields ( char const **  out[],
rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Returns name of fields.

Definition at line 189 of file rlm_sql_firebird.c.

static sql_rcode_t sql_finish_query ( rlm_sql_handle_t handle,
rlm_sql_config_t config 
)
static

End the query.

Definition at line 253 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_finish_select_query ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

End the select query, such as freeing memory or result.

Definition at line 240 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_free_result ( rlm_sql_handle_t handle,
rlm_sql_config_t config 
)
static

+ Here is the caller graph for this function:

static sql_rcode_t sql_free_result ( UNUSED rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Frees memory allocated for a result set.

Definition at line 263 of file rlm_sql_firebird.c.

static int sql_num_fields ( rlm_sql_handle_t handle,
rlm_sql_config_t config 
)
static
static int sql_num_fields ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config 
)
static

Returns number of columns from query.

Definition at line 173 of file rlm_sql_firebird.c.

static int sql_num_rows ( rlm_sql_handle_t handle,
rlm_sql_config_t config 
)
static

Returns number of rows in query.

Definition at line 181 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_query ( rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t config,
char const *  query 
)
static

Issue a non-SELECT query (ie: update/delete/insert) to the database.

Definition at line 96 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static sql_rcode_t sql_select_query ( rlm_sql_handle_t handle,
rlm_sql_config_t config,
char const *  query 
)
static

Issue a select query to the database.

Definition at line 165 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

static sql_rcode_t sql_socket_init ( rlm_sql_handle_t handle,
rlm_sql_config_t config,
UNUSED struct timeval const *  timeout 
)
static

Establish connection to the db.

Definition at line 71 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

Variable Documentation

rlm_sql_module_t rlm_sql_firebird
Initial value:
= {
.name = "rlm_sql_firebird",
.sql_socket_init = sql_socket_init,
.sql_query = sql_query,
.sql_select_query = sql_select_query,
.sql_num_fields = sql_num_fields,
.sql_num_rows = sql_num_rows,
.sql_affected_rows = sql_affected_rows,
.sql_fetch_row = sql_fetch_row,
.sql_fields = sql_fields,
.sql_free_result = sql_free_result,
.sql_error = sql_error,
.sql_finish_query = sql_finish_query,
.sql_finish_select_query = sql_finish_select_query
}
static sql_rcode_t sql_fetch_row(rlm_sql_row_t *out, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Returns an individual row.
static int sql_num_rows(rlm_sql_handle_t *handle, rlm_sql_config_t *config)
Returns number of rows in query.
static sql_rcode_t sql_free_result(rlm_sql_handle_t *handle, rlm_sql_config_t *config)
static sql_rcode_t sql_finish_select_query(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
End the select query, such as freeing memory or result.
static sql_rcode_t sql_socket_init(rlm_sql_handle_t *handle, rlm_sql_config_t *config, UNUSED struct timeval const *timeout)
Establish connection to the db.
static sql_rcode_t sql_query(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config, char const *query)
Issue a non-SELECT query (ie: update/delete/insert) to the database.
static sql_rcode_t sql_fields(char const **out[], rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Returns name of fields.
static int sql_affected_rows(rlm_sql_handle_t *handle, rlm_sql_config_t *config)
static sql_rcode_t sql_finish_query(rlm_sql_handle_t *handle, rlm_sql_config_t *config)
End the query.
static sql_rcode_t sql_select_query(rlm_sql_handle_t *handle, rlm_sql_config_t *config, char const *query)
Issue a select query to the database.
static int sql_num_fields(rlm_sql_handle_t *handle, rlm_sql_config_t *config)
static size_t sql_error(UNUSED TALLOC_CTX *ctx, sql_log_entry_t out[], size_t outlen, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t *config)
Retrieves any errors associated with the connection handle.

Definition at line 305 of file rlm_sql_firebird.c.