Apache Portable Runtime
|
Data Fields | |
const char * | name |
void(* | init )(apr_pool_t *pool) |
void *(* | native_handle )(apr_dbd_t *handle) |
apr_dbd_t *(* | open )(apr_pool_t *pool, const char *params, const char **error) |
apr_status_t(* | check_conn )(apr_pool_t *pool, apr_dbd_t *handle) |
apr_status_t(* | close )(apr_dbd_t *handle) |
int(* | set_dbname )(apr_pool_t *pool, apr_dbd_t *handle, const char *name) |
int(* | start_transaction )(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_transaction_t **trans) |
int(* | end_transaction )(apr_dbd_transaction_t *trans) |
int(* | query )(apr_dbd_t *handle, int *nrows, const char *statement) |
int(* | select )(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, const char *statement, int random) |
int(* | num_cols )(apr_dbd_results_t *res) |
int(* | num_tuples )(apr_dbd_results_t *res) |
int(* | get_row )(apr_pool_t *pool, apr_dbd_results_t *res, apr_dbd_row_t **row, int rownum) |
const char *(* | get_entry )(const apr_dbd_row_t *row, int col) |
const char *(* | error )(apr_dbd_t *handle, int errnum) |
const char *(* | escape )(apr_pool_t *pool, const char *string, apr_dbd_t *handle) |
int(* | prepare )(apr_pool_t *pool, apr_dbd_t *handle, const char *query, const char *label, int nargs, int nvals, apr_dbd_type_e *types, apr_dbd_prepared_t **statement) |
int(* | pvquery )(apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, va_list args) |
int(* | pvselect )(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, va_list args) |
int(* | pquery )(apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, const char **args) |
int(* | pselect )(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, const char **args) |
const char *(* | get_name )(const apr_dbd_results_t *res, int col) |
int(* | transaction_mode_get )(apr_dbd_transaction_t *trans) |
int(* | transaction_mode_set )(apr_dbd_transaction_t *trans, int mode) |
const char * | pformat |
int(* | pvbquery )(apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, va_list args) |
int(* | pvbselect )(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, va_list args) |
int(* | pbquery )(apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, const void **args) |
int(* | pbselect )(apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, const void **args) |
apr_status_t(* | datum_get )(const apr_dbd_row_t *row, int col, apr_dbd_type_e type, void *data) |
apr_status_t(* apr_dbd_driver_t::check_conn) (apr_pool_t *pool, apr_dbd_t *handle) |
check_conn: check status of a database connection
pool | - a pool to use for error messages (if any). |
handle | - the connection to check |
apr_status_t(* apr_dbd_driver_t::close) (apr_dbd_t *handle) |
close: close/release a connection obtained from open()
handle | - the connection to release |
apr_status_t(* apr_dbd_driver_t::datum_get) (const apr_dbd_row_t *row, int col, apr_dbd_type_e type, void *data) |
datum_get: get a binary entry from a row
row | - row pointer |
col | - entry number |
type | - type of data to get |
data | - pointer to data, allocated by the caller |
int(* apr_dbd_driver_t::end_transaction) (apr_dbd_transaction_t *trans) |
end_transaction: end a transaction (commit on success, rollback on error). May be a no-op.
trans | - the transaction. |
const char*(* apr_dbd_driver_t::error) (apr_dbd_t *handle, int errnum) |
error: get current error message (if any)
handle | - the connection |
errnum | - error code from operation that returned an error |
const char*(* apr_dbd_driver_t::escape) (apr_pool_t *pool, const char *string, apr_dbd_t *handle) |
escape: escape a string so it is safe for use in query/select
pool | - pool to alloc the result from |
string | - the string to escape |
handle | - the connection |
const char*(* apr_dbd_driver_t::get_entry) (const apr_dbd_row_t *row, int col) |
get_entry: get an entry from a row
row | - row pointer |
col | - entry number |
val | - entry to fill |
const char*(* apr_dbd_driver_t::get_name) (const apr_dbd_results_t *res, int col) |
get_name: get a column title from a result set
res | - result set pointer |
col | - entry number |
int(* apr_dbd_driver_t::get_row) (apr_pool_t *pool, apr_dbd_results_t *res, apr_dbd_row_t **row, int rownum) |
get_row: get a row from a result set
pool | - pool to allocate the row |
res | - result set pointer |
row | - pointer to row pointer. May point to NULL on entry |
rownum | - row number, or -1 for "next row". Ignored if random access is not supported. |
void(* apr_dbd_driver_t::init) (apr_pool_t *pool) |
init: allow driver to perform once-only initialisation. Called once only. May be NULL
const char* apr_dbd_driver_t::name |
name
void*(* apr_dbd_driver_t::native_handle) (apr_dbd_t *handle) |
native_handle: return the native database handle of the underlying db
handle | - apr_dbd handle |
int(* apr_dbd_driver_t::num_cols) (apr_dbd_results_t *res) |
num_cols: get the number of columns in a results set
res | - result set. |
int(* apr_dbd_driver_t::num_tuples) (apr_dbd_results_t *res) |
num_tuples: get the number of rows in a results set of a synchronous select
res | - result set. |
apr_dbd_t*(* apr_dbd_driver_t::open) (apr_pool_t *pool, const char *params, const char **error) |
open: obtain a database connection from the server rec. Must be explicitly closed when you're finished with it. WARNING: only use this when you need a connection with a lifetime other than a request
pool | - a pool to use for error messages (if any). |
params | - connection parameters. |
error | - descriptive error. |
int(* apr_dbd_driver_t::pbquery) (apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, const void **args) |
pbquery: query using a prepared statement + binary args
pool | - working pool |
handle | - the connection |
nrows | - number of rows affected. |
statement | - the prepared statement to execute |
args | - binary args to prepared statement |
int(* apr_dbd_driver_t::pbselect) (apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, const void **args) |
pbselect: select using a prepared statement + binary args
pool | - working pool |
handle | - the connection |
res | - pointer to query results. May point to NULL on entry |
statement | - the prepared statement to execute |
random | - Whether to support random-access to results |
args | - binary args to prepared statement |
const char* apr_dbd_driver_t::pformat |
format of prepared statement parameters
int(* apr_dbd_driver_t::pquery) (apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, const char **args) |
pquery: query using a prepared statement + args
pool | - working pool |
handle | - the connection |
nrows | - number of rows affected. |
statement | - the prepared statement to execute |
args | - args to prepared statement |
int(* apr_dbd_driver_t::prepare) (apr_pool_t *pool, apr_dbd_t *handle, const char *query, const char *label, int nargs, int nvals, apr_dbd_type_e *types, apr_dbd_prepared_t **statement) |
prepare: prepare a statement
pool | - pool to alloc the result from |
handle | - the connection |
query | - the SQL query |
label | - A label for the prepared statement. use NULL for temporary prepared statements (eg within a Request in httpd) |
nargs | - number of parameters in the query |
nvals | - number of values passed in p[b]query/select |
types | - pointer to an array with types of parameters |
statement | - statement to prepare. May point to null on entry. |
int(* apr_dbd_driver_t::pselect) (apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, const char **args) |
pselect: select using a prepared statement + args
pool | - working pool |
handle | - the connection |
res | - pointer to query results. May point to NULL on entry |
statement | - the prepared statement to execute |
random | - Whether to support random-access to results |
args | - args to prepared statement |
int(* apr_dbd_driver_t::pvbquery) (apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, va_list args) |
pvbquery: query using a prepared statement + binary args
pool | - working pool |
handle | - the connection |
nrows | - number of rows affected. |
statement | - the prepared statement to execute |
args | - binary args to prepared statement |
int(* apr_dbd_driver_t::pvbselect) (apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, va_list args) |
pvbselect: select using a prepared statement + binary args
pool | - working pool |
handle | - the connection |
res | - pointer to query results. May point to NULL on entry |
statement | - the prepared statement to execute |
random | - Whether to support random-access to results |
args | - binary args to prepared statement |
int(* apr_dbd_driver_t::pvquery) (apr_pool_t *pool, apr_dbd_t *handle, int *nrows, apr_dbd_prepared_t *statement, va_list args) |
pvquery: query using a prepared statement + args
pool | - working pool |
handle | - the connection |
nrows | - number of rows affected. |
statement | - the prepared statement to execute |
args | - args to prepared statement |
int(* apr_dbd_driver_t::pvselect) (apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, apr_dbd_prepared_t *statement, int random, va_list args) |
pvselect: select using a prepared statement + args
pool | - working pool |
handle | - the connection |
res | - pointer to query results. May point to NULL on entry |
statement | - the prepared statement to execute |
random | - Whether to support random-access to results |
args | - args to prepared statement |
int(* apr_dbd_driver_t::query) (apr_dbd_t *handle, int *nrows, const char *statement) |
query: execute an SQL query that doesn't return a result set
handle | - the connection |
nrows | - number of rows affected. |
statement | - the SQL statement to execute |
int(* apr_dbd_driver_t::select) (apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_results_t **res, const char *statement, int random) |
select: execute an SQL query that returns a result set
pool | - pool to allocate the result set |
handle | - the connection |
res | - pointer to result set pointer. May point to NULL on entry |
statement | - the SQL statement to execute |
random | - 1 to support random access to results (seek any row); 0 to support only looping through results in order (async access - faster) |
int(* apr_dbd_driver_t::set_dbname) (apr_pool_t *pool, apr_dbd_t *handle, const char *name) |
set_dbname: select database name. May be a no-op if not supported.
pool | - working pool |
handle | - the connection |
name | - the database to select |
int(* apr_dbd_driver_t::start_transaction) (apr_pool_t *pool, apr_dbd_t *handle, apr_dbd_transaction_t **trans) |
transaction: start a transaction. May be a no-op.
pool | - a pool to use for error messages (if any). |
handle | - the connection |
trans | - ptr to a transaction. May be null on entry |
int(* apr_dbd_driver_t::transaction_mode_get) (apr_dbd_transaction_t *trans) |
transaction_mode_get: get the mode of transaction
trans | - the transaction. |
int(* apr_dbd_driver_t::transaction_mode_set) (apr_dbd_transaction_t *trans, int mode) |
transaction_mode_set: get the mode of transaction
trans | - the transaction. |
mode | - new mode of the transaction |