23RCSID(
"$Id: f5a70a4b1eeb6759378f8be624f40b12b6d228c1 $")
25#include <freeradius-devel/server/base.h>
30static const void *
fake =
"fake";
61 query_ctx->
tconn = tconn;
77 query_ctx->
row = NULL;
113 .sql_query_resume = sql_query_resume,
114 .sql_select_query_resume = sql_query_resume,
123 .connection_alloc = sql_trunk_connection_alloc,
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
#define UNCONST(_type, _ptr)
Remove const qualification from a pointer.
#define CC_NO_UBSAN(_sanitize)
@ CONNECTION_STATE_CONNECTED
File descriptor is open (ready for writing).
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
void unlang_interpret_mark_runnable(request_t *request)
Mark a request as resumable.
Stores all information relating to an event list.
static const conf_parser_t config[]
rlm_rcode_t
Return codes indicating the result of the module call.
Prototypes and functions for the SQL module.
trunk_connection_t * tconn
Trunk connection this query is being run on.
request_t * request
Request this query relates to.
sql_rcode_t
Action to take at end of an SQL query.
@ RLM_SQL_NO_MORE_ROWS
No more rows available.
rlm_sql_row_t row
Row data from the last query.
sql_rcode_t rcode
Result code.
rlm_sql_driver_t rlm_sql_null
static void _sql_connection_close(UNUSED fr_event_list_t *el, UNUSED void *h, UNUSED void *uctx)
static unlang_action_t sql_fetch_row(rlm_rcode_t *p_result, UNUSED int *priority, UNUSED request_t *request, void *uctx)
static int sql_affected_rows(UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
static int sql_num_rows(UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
static sql_rcode_t sql_finish_query(UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
static connection_state_t _sql_connection_init(void **h, UNUSED connection_t *conn, UNUSED void *uctx)
static size_t sql_error(UNUSED TALLOC_CTX *ctx, UNUSED sql_log_entry_t out[], UNUSED size_t outlen, UNUSED fr_sql_query_t *query_ctx)
Stub function for retrieving errors, should not be called.
static sql_rcode_t sql_free_result(UNUSED fr_sql_query_t *query_ctx, UNUSED rlm_sql_config_t const *config)
SQL_TRUNK_CONNECTION_ALLOC static SQL_QUERY_RESUME void sql_trunk_request_mux(UNUSED fr_event_list_t *el, trunk_connection_t *tconn, UNUSED connection_t *conn, UNUSED void *uctx)
Macros to reduce boilerplate in trunk SQL drivers.
#define SQL_TRUNK_CONNECTION_ALLOC
Allocate an SQL trunk connection.
module_t common
Common fields for all loadable modules.
int trunk_connection_pop_request(trunk_request_t **treq_out, trunk_connection_t *tconn)
Pop a request off a connection's pending queue.
void trunk_request_signal_reapable(trunk_request_t *treq)
Signal that the request was written to a connection successfully, but no response is expected.
Associates request queues with a connection.
static fr_event_list_t * el
static size_t char ** out