con.h File Reference

#include "../../db/db_pool.h"
#include "../../db/db_id.h"
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <sql.h>
#include <sqlext.h>
#include <sqlucode.h>

Include dependency graph for con.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  my_con
struct  strn

Defines

#define CON_CONNECTION(db_con)   (((struct my_con*)((db_con)->tail))->dbc)
#define CON_ENV(db_con)   (((struct my_con*)((db_con)->tail))->env)
#define CON_ID(db_con)   (((struct my_con*)((db_con)->tail))->id)
#define CON_RESULT(db_con)   (((struct my_con*)((db_con)->tail))->stmt_handle)
#define CON_ROW(db_con)   (((struct my_con*)((db_con)->tail))->row)
#define CON_TIMESTAMP(db_con)   (((struct my_con*)((db_con)->tail))->timestamp)
#define MAX_CONN_STR_LEN   2048
#define STRN_LEN   1024

Functions

char * db_unixodbc_build_conn_str (const struct db_id *id, char *buf)
void db_unixodbc_extract_error (const char *fn, const SQLHANDLE handle, const SQLSMALLINT type, char *stret)
void db_unixodbc_free_connection (struct my_con *con)
struct my_condb_unixodbc_new_connection (struct db_id *id)


Define Documentation

#define CON_CONNECTION ( db_con   )     (((struct my_con*)((db_con)->tail))->dbc)

Definition at line 70 of file con.h.

#define CON_ENV ( db_con   )     (((struct my_con*)((db_con)->tail))->env)

Definition at line 74 of file con.h.

#define CON_ID ( db_con   )     (((struct my_con*)((db_con)->tail))->id)

Definition at line 73 of file con.h.

#define CON_RESULT ( db_con   )     (((struct my_con*)((db_con)->tail))->stmt_handle)

Definition at line 69 of file con.h.

#define CON_ROW ( db_con   )     (((struct my_con*)((db_con)->tail))->row)

Definition at line 71 of file con.h.

#define CON_TIMESTAMP ( db_con   )     (((struct my_con*)((db_con)->tail))->timestamp)

Definition at line 72 of file con.h.

#define MAX_CONN_STR_LEN   2048

Definition at line 76 of file con.h.

Referenced by db_unixodbc_build_conn_str(), db_unixodbc_new_connection(), and reconnect().

#define STRN_LEN   1024

Definition at line 46 of file con.h.

Referenced by db_unixodbc_convert_rows(), and db_unixodbc_fetch_result().


Function Documentation

char* db_unixodbc_build_conn_str ( const struct db_id id,
char *  buf 
)

void db_unixodbc_extract_error ( const char *  fn,
const SQLHANDLE  handle,
const SQLSMALLINT  type,
char *  stret 
)

Definition at line 205 of file con.c.

References len, and LM_ERR.

Referenced by db_unixodbc_get_columns(), db_unixodbc_new_connection(), db_unixodbc_submit_query(), and reconnect().

void db_unixodbc_free_connection ( struct my_con con  ) 

Definition at line 195 of file con.c.

References my_con::dbc, my_con::env, and pkg_free.

Referenced by db_unixodbc_close().

struct my_con* db_unixodbc_new_connection ( struct db_id id  )  [read]


Generated on Mon May 21 18:00:37 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6