Functions

db_postgres/km_val.c File Reference

DB_POSTGRES :: CoreModule: DB_POSTGRES :: the PostgreSQL driver for Kamailio. More...

#include "../../lib/srdb1/db_val.h"
#include "../../lib/srdb1/db_ut.h"
#include "../../dprint.h"
#include "km_pg_con.h"
#include "../../mem/mem.h"
#include "km_val.h"
Include dependency graph for db_postgres/km_val.c:

Go to the source code of this file.

Functions


Detailed Description

Definition in file db_postgres/km_val.c.


Function Documentation

int db_postgres_str2val ( const db_type_t  _t,
db_val_t _v,
const char *  _s,
const int  _l 
)

Convert a str to a db value, copy strings. The postgresql module uses a custom escape function for BLOBs. If the _s is linked in the db_val result, it will be returned zero

Parameters:
_t destination value type
_v destination value
_s source string
_l string length
Returns:
0 on success, negative on error

Definition at line 58 of file db_postgres/km_val.c.

References DB1_BLOB, VAL_BLOB, VAL_FREE, and VAL_TYPE.

Referenced by db_postgres_convert_row().

Here is the caller graph for this function:

int db_postgres_val2str ( const db1_con_t _con,
const db_val_t _v,
char *  _s,
int *  _len 
)

Converting a value to a string, used when converting result from a query

Parameters:
_con database connection
_v source value
_s target string
_len target string length
Returns:
0 on success, negative on error

Definition at line 110 of file db_postgres/km_val.c.

References DB1_BLOB, DB1_STR, DB1_STRING, VAL_BLOB, VAL_STR, VAL_STRING, and VAL_TYPE.

Referenced by db_postgres_delete(), db_postgres_insert(), db_postgres_query(), and db_postgres_update().

Here is the caller graph for this function: