The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions | Variables
rlm_sql_firebird.c File Reference
#include "sql_fbapi.h"
#include <freeradius-devel/util/debug.h>
+ Include dependency graph for rlm_sql_firebird.c:

Go to the source code of this file.

Macros

#define LOG_PREFIX   "sql - firebird"
 

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 const *config)
 
static int sql_affected_rows (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *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[], NDEBUG_UNUSED size_t outlen, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *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 const *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 const *config)
 Returns name of fields. More...
 
static sql_rcode_t sql_finish_query (rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
 
static sql_rcode_t sql_finish_query (UNUSED rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config)
 End the query. More...
 
static sql_rcode_t sql_finish_select_query (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *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 const *config)
 
static sql_rcode_t sql_free_result (UNUSED rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config)
 Frees memory allocated for a result set. More...
 
static int sql_num_fields (rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
 
static int sql_num_fields (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config)
 Returns number of columns from query. More...
 
static int sql_num_rows (rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
 Returns number of rows in query. More...
 
static sql_rcode_t sql_query (rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *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 const *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 const *config, UNUSED fr_time_delta_t timeout)
 Establish connection to the db. More...
 

Variables

rlm_sql_driver_t rlm_sql_firebird
 

Macro Definition Documentation

◆ LOG_PREFIX

#define LOG_PREFIX   "sql - firebird"

Definition at line 23 of file rlm_sql_firebird.c.

Function Documentation

◆ _sql_socket_destructor()

static int _sql_socket_destructor ( rlm_sql_firebird_conn_t conn)
static

Definition at line 35 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sql_affected_rows() [1/2]

static int sql_affected_rows ( rlm_sql_handle_t handle,
rlm_sql_config_t const *  config 
)
static
+ Here is the caller graph for this function:

◆ sql_affected_rows() [2/2]

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

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

Definition at line 288 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_error()

static size_t sql_error ( UNUSED TALLOC_CTX *  ctx,
sql_log_entry_t  out[],
NDEBUG_UNUSED size_t  outlen,
rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t const *  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 269 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_fetch_row()

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

Returns an individual row.

Definition at line 201 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_fields()

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

Returns name of fields.

Definition at line 180 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_finish_query() [1/2]

static sql_rcode_t sql_finish_query ( rlm_sql_handle_t handle,
rlm_sql_config_t const *  config 
)
static

◆ sql_finish_query() [2/2]

static sql_rcode_t sql_finish_query ( UNUSED rlm_sql_handle_t handle,
UNUSED rlm_sql_config_t const *  config 
)
static

End the query.

Definition at line 245 of file rlm_sql_firebird.c.

◆ sql_finish_select_query()

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

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

Definition at line 232 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_free_result() [1/2]

static sql_rcode_t sql_free_result ( rlm_sql_handle_t handle,
rlm_sql_config_t const *  config 
)
static

◆ sql_free_result() [2/2]

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

Frees memory allocated for a result set.

Definition at line 253 of file rlm_sql_firebird.c.

◆ sql_num_fields() [1/2]

static int sql_num_fields ( rlm_sql_handle_t handle,
rlm_sql_config_t const *  config 
)
static

◆ sql_num_fields() [2/2]

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

Returns number of columns from query.

Definition at line 164 of file rlm_sql_firebird.c.

◆ sql_num_rows()

static int sql_num_rows ( rlm_sql_handle_t handle,
rlm_sql_config_t const *  config 
)
static

Returns number of rows in query.

Definition at line 172 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_query()

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

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

Definition at line 95 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sql_select_query()

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

Issue a select query to the database.

Definition at line 156 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_socket_init()

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

Establish connection to the db.

Definition at line 70 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

Variable Documentation

◆ rlm_sql_firebird

rlm_sql_driver_t rlm_sql_firebird
Initial value:
= {
.common = {
.name = "sql_firebird",
},
.number = 9,
.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
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:65
static sql_rcode_t sql_free_result(rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
static sql_rcode_t sql_finish_query(rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
static sql_rcode_t sql_fetch_row(rlm_sql_row_t *out, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config)
Returns an individual row.
static int sql_num_rows(rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
Returns number of rows in query.
static int sql_num_fields(rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
static int sql_affected_rows(rlm_sql_handle_t *handle, rlm_sql_config_t const *config)
static sql_rcode_t sql_finish_select_query(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config)
End the select query, such as freeing memory or result.
static sql_rcode_t sql_query(rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config, char const *query)
Issue a non-SELECT query (ie: update/delete/insert) to the database.
static sql_rcode_t sql_select_query(rlm_sql_handle_t *handle, rlm_sql_config_t const *config, char const *query)
Issue a select query to the database.
static sql_rcode_t sql_socket_init(rlm_sql_handle_t *handle, rlm_sql_config_t const *config, UNUSED fr_time_delta_t timeout)
Establish connection to the db.
static sql_rcode_t sql_fields(char const **out[], rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config)
Returns name of fields.
static size_t sql_error(UNUSED TALLOC_CTX *ctx, sql_log_entry_t out[], NDEBUG_UNUSED size_t outlen, rlm_sql_handle_t *handle, UNUSED rlm_sql_config_t const *config)
Retrieves any errors associated with the connection handle.

Definition at line 295 of file rlm_sql_firebird.c.