Functions

db_row.c File Reference

Type that represents a row in a database. More...

#include "db_row.h"
#include <string.h>
#include "../../dprint.h"
#include "../../mem/mem.h"
Include dependency graph for db_row.c:

Go to the source code of this file.

Functions


Detailed Description

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.


Function Documentation

int db_allocate_row ( const db1_res_t _res,
db_row_t _row 
) [inline]
Parameters:
_res result set
_row filled row
Returns:
zero on success, negative on errors

Definition at line 111 of file db_row.c.

References RES_COL_N, ROW_N, and ROW_VALUES.

Referenced by bdb_convert_row(), db_mysql_convert_row(), and db_postgres_convert_row().

Here is the caller graph for this function:

int db_free_row ( db_row_t _r  )  [inline]

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.

Parameters:
_r row that should be released
Returns:
zero on success, negative on error

Definition at line 42 of file db_row.c.

References DB1_BLOB, DB1_STR, DB1_STRING, ROW_N, ROW_VALUES, VAL_BLOB, VAL_FREE, VAL_NULL, VAL_STR, VAL_STRING, and VAL_TYPE.

Referenced by bdb_convert_row(), db_free_rows(), db_mysql_convert_row(), and db_postgres_convert_row().

Here is the caller graph for this function: