#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>


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_con * | db_unixodbc_new_connection (struct db_id *id) |
| #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().
| char* db_unixodbc_build_conn_str | ( | const struct db_id * | id, | |
| char * | buf | |||
| ) |
Definition at line 48 of file con.c.
References db_id::database, DSN_ATTR, DSN_ATTR_LEN, len, LM_ERR, MAX_CONN_STR_LEN, db_id::password, PWD_ATTR, PWD_ATTR_LEN, UID_ATTR, UID_ATTR_LEN, and db_id::username.
Referenced by db_unixodbc_new_connection(), and reconnect().
| void db_unixodbc_extract_error | ( | const char * | fn, | |
| const SQLHANDLE | handle, | |||
| const SQLSMALLINT | type, | |||
| char * | stret | |||
| ) |
Definition at line 205 of file con.c.
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().
Definition at line 101 of file con.c.
References db_id::database, db_unixodbc_build_conn_str(), db_unixodbc_extract_error(), my_con::dbc, my_con::env, db_id::host, my_con::id, LM_DBG, LM_ERR, MAX_CONN_STR_LEN, NULL, pkg_free, pkg_malloc, my_con::ref, my_con::stmt_handle, my_con::timestamp, and ZSW.
Referenced by db_unixodbc_init().
1.5.6