Data Structures | Functions

db_id.h File Reference

Functions for parsing a database URL and works with db identifier. More...

#include "../../str.h"
#include "db.h"
#include "db.h"
Include dependency graph for db_id.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

Functions


Detailed Description

Definition in file db_id.h.


Function Documentation

unsigned char cmp_db_id ( const struct db_id id1,
const struct db_id id2 
)
Parameters:
id1 first identifier
id2 second identifier
Returns:
1 if both identifier are equal, 0 if there not equal
Parameters:
id1 first identifier
id2 second identifier
Returns:
one if both are equal, zero otherwise

Definition at line 272 of file db_id.c.

References db_id::database, db_id::host, db_id::password, db_id::pid, db_id::poolid, db_id::port, db_id::scheme, and db_id::username.

Referenced by pool_get().

Here is the caller graph for this function:

void free_db_id ( struct db_id id  ) 
Parameters:
id the identifier that should released
id identifier

Definition at line 308 of file db_id.c.

References db_id::database, db_id::host, db_id::password, db_id::scheme, and db_id::username.

Referenced by db_do_init2(), db_mysql_free_connection(), and db_postgres_free_connection().

Here is the caller graph for this function:

struct db_id* new_db_id ( const str url,
db_pooling_t  pooling 
) [read]
Parameters:
url database URL
pooling whether or not a pooled connection may be used
Returns:
new allocated db_id structure, NULL on failure
Parameters:
url database URL
pooling whether or not a pooled connection may be used
Returns:
connection identifier, or zero on error

Definition at line 232 of file db_id.c.

References _str::len, parse_db_url(), db_id::pid, db_id::poolid, and _str::s.

Referenced by db_do_init2().

Here is the call graph for this function:

Here is the caller graph for this function: