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 (fr_sql_query_t *query_ctx, 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, fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 Retrieves any errors associated with the query context. More...
 
static unlang_action_t sql_fetch_row (rlm_rcode_t *p_result, UNUSED int *priority, UNUSED request_t *request, void *uctx)
 Returns an individual row. More...
 
static sql_rcode_t sql_fields (char const **out[], fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 Returns name of fields. More...
 
static sql_rcode_t sql_finish_query (UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 End the query. More...
 
static sql_rcode_t sql_finish_select_query (fr_sql_query_t *query_ctx, 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 (UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
 Frees memory allocated for a result set. More...
 
static unlang_action_t sql_query (rlm_rcode_t *p_result, UNUSED int *priority, UNUSED request_t *request, void *uctx)
 Issue a 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 28 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()

static int sql_affected_rows ( fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

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

Definition at line 271 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,
fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

Retrieves any errors associated with the query context.

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.
query_ctxQuery context to retrieve error for.
configrlm_sql config.
Returns
number of errors written to the sql_log_entry_t array.

Definition at line 252 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_fetch_row()

static unlang_action_t sql_fetch_row ( rlm_rcode_t p_result,
UNUSED int *  priority,
UNUSED request_t request,
void *  uctx 
)
static

Returns an individual row.

Definition at line 178 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[],
fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

Returns name of fields.

Definition at line 157 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_finish_query()

static sql_rcode_t sql_finish_query ( UNUSED fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

End the query.

Definition at line 228 of file rlm_sql_firebird.c.

◆ sql_finish_select_query()

static sql_rcode_t sql_finish_select_query ( fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

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

Definition at line 215 of file rlm_sql_firebird.c.

+ Here is the call graph for this function:

◆ sql_free_result()

static sql_rcode_t sql_free_result ( UNUSED fr_sql_query_t query_ctx,
UNUSED rlm_sql_config_t const *  config 
)
static

Frees memory allocated for a result set.

Definition at line 236 of file rlm_sql_firebird.c.

◆ sql_query()

static unlang_action_t sql_query ( rlm_rcode_t p_result,
UNUSED int *  priority,
UNUSED request_t request,
void *  uctx 
)
static

Issue a query to the database.

Definition at line 88 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 63 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",
},
.sql_socket_init = sql_socket_init,
.sql_query = sql_query,
.sql_select_query = sql_query,
.sql_num_rows = sql_affected_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:63
static sql_rcode_t sql_fields(char const **out[], fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
Returns name of fields.
static sql_rcode_t sql_finish_select_query(fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
End the select query, such as freeing memory or result.
static unlang_action_t sql_fetch_row(rlm_rcode_t *p_result, UNUSED int *priority, UNUSED request_t *request, void *uctx)
Returns an individual row.
static sql_rcode_t sql_finish_query(UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
End the query.
static sql_rcode_t sql_free_result(UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
Frees memory allocated for a result set.
static int sql_affected_rows(fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
Return the number of rows affected by the query (update, or insert)
static size_t sql_error(UNUSED TALLOC_CTX *ctx, sql_log_entry_t out[], NDEBUG_UNUSED size_t outlen, fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
Retrieves any errors associated with the query context.
static unlang_action_t sql_query(rlm_rcode_t *p_result, UNUSED int *priority, UNUSED request_t *request, void *uctx)
Issue a 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.

Definition at line 278 of file rlm_sql_firebird.c.