#include "db_row.h"
#include <string.h>
#include "../dprint.h"
#include "../mem/mem.h"

Go to the source code of this file.
Functions | |
| int | db_allocate_row (const db_res_t *_res, db_row_t *_row) |
| int | db_free_row (db_row_t *_r) |
This file holds a type that represents a row in a database, some convenience macros and a function for memory managements.
Definition in file db_row.c.
Allocate memory for row value.
| _res | result set | |
| _row | filled row |
Definition at line 111 of file db_row.c.
References len, LM_DBG, LM_ERR, pkg_malloc, RES_COL_N, ROW_N, and ROW_VALUES.
Referenced by bdb_append_row(), bdb_convert_row(), db_mysql_convert_row(), db_postgres_convert_row(), db_unixodbc_convert_row(), and dbt_convert_row().
| int db_free_row | ( | db_row_t * | _r | ) | [inline] |
Release memory used by a row. This method only frees values that are inside the row if the free flag of the specific value is set. Otherwise this storage must be released when the database specific result free function is called. Only string based values are freed if wanted, null values are skipped.
| _r | row that should be released |
Definition at line 42 of file db_row.c.
References DB_BLOB, DB_STR, DB_STRING, len, LM_DBG, LM_ERR, NULL, pkg_free, ROW_N, ROW_VALUES, s, VAL_BLOB, VAL_FREE, VAL_NULL, VAL_STR, VAL_STRING, and VAL_TYPE.
Referenced by bdb_append_row(), bdb_convert_row(), db_free_rows(), db_mysql_convert_row(), db_postgres_convert_row(), and db_unixodbc_convert_row().
1.5.6