2.3. DBD Helper Functions

2.3.1. _dbd_result_create

dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned int numrows_matched, unsigned int numrows_affected)

Allocates a new dbi_result_t, filling the number of rows matched and affected, storing the database-specific result handle, and allocating room for rows to be stored.

2.3.2. _dbd_result_set_numfields

void _dbd_result_set_numfields(dbi_result_t *result, unsigned int numfields)

Sets a result's number of fields and allocates room for field information to be stored.

2.3.3. _dbd_result_add_field

void _dbd_result_add_field(dbi_result_t *result, unsigned int idx, char *name, unsigned short type, unsigned int attribs)

Stores information about the target field into the result set.

2.3.4. _dbd_row_allocate

dbi_row_t *_dbd_row_allocate(unsigned int numfields)

Allocates a new row, ready to be filled with data.

2.3.5. _dbd_row_finalize

void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned int idx)

Associates and stores the row with the result set, once the row's data has been filled.

2.3.6. _dbd_internal_error_handler

void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, const int errno)

Saves error message information generated by libdbi (rather than by the database or its API). If an old error message string exists, it will be freed.