dbd.h   dbd.h 
skipping to change at line 20 skipping to change at line 20
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
* $Id: dbd.h,v 1.29 2005/08/15 19:18:18 mhoenicka Exp $ * $Id: dbd.h,v 1.33 2013/01/08 23:54:30 mhoenicka Exp $
*/ */
#ifndef __DBD_H__ #ifndef __DBD_H__
#define __DBD_H__ #define __DBD_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <dbi/dbi.h> #include <dbi/dbi.h>
#include <dbi/dbi-dev.h> #include <dbi/dbi-dev.h>
/* FUNCTIONS EXPORTED BY EACH DRIVER */ /* FUNCTIONS EXPORTED BY EACH DRIVER */
void dbd_register_driver(const dbi_info_t **_driver_info, const char ***_cu stom_functions, const char ***_reserved_words); void dbd_register_driver(const dbi_info_t **_driver_info, const char ***_cu stom_functions, const char ***_reserved_words);
int dbd_initialize(dbi_driver_t *driver); int dbd_initialize(dbi_driver_t *driver);
int dbd_finalize(dbi_driver_t *driver);
int dbd_connect(dbi_conn_t *conn); int dbd_connect(dbi_conn_t *conn);
int dbd_disconnect(dbi_conn_t *conn); int dbd_disconnect(dbi_conn_t *conn);
int dbd_fetch_row(dbi_result_t *result, unsigned long long rowidx); int dbd_fetch_row(dbi_result_t *result, unsigned long long rowidx);
int dbd_free_query(dbi_result_t *result); int dbd_free_query(dbi_result_t *result);
int dbd_goto_row(dbi_result_t *result, unsigned long long rowidx); int dbd_goto_row(dbi_result_t *result, unsigned long long rowidx, unsigned long long currowidx);
int dbd_get_socket(dbi_conn_t *conn); int dbd_get_socket(dbi_conn_t *conn);
const char *dbd_get_encoding(dbi_conn_t *conn); const char *dbd_get_encoding(dbi_conn_t *conn);
const char* dbd_encoding_from_iana(const char *iana_encoding); const char* dbd_encoding_from_iana(const char *iana_encoding);
const char* dbd_encoding_to_iana(const char *iana_encoding); const char* dbd_encoding_to_iana(const char *iana_encoding);
char *dbd_get_engine_version(dbi_conn_t *conn, char *versionstring); char *dbd_get_engine_version(dbi_conn_t *conn, char *versionstring);
dbi_result_t *dbd_list_dbs(dbi_conn_t *conn, const char *pattern); dbi_result_t *dbd_list_dbs(dbi_conn_t *conn, const char *pattern);
dbi_result_t *dbd_list_tables(dbi_conn_t *conn, const char *db, const char *pattern); dbi_result_t *dbd_list_tables(dbi_conn_t *conn, const char *db, const char *pattern);
dbi_result_t *dbd_query(dbi_conn_t *conn, const char *statement); dbi_result_t *dbd_query(dbi_conn_t *conn, const char *statement);
dbi_result_t *dbd_query_null(dbi_conn_t *conn, const unsigned char *stateme nt, size_t st_length); dbi_result_t *dbd_query_null(dbi_conn_t *conn, const unsigned char *stateme nt, size_t st_length);
int dbd_transaction_begin(dbi_conn_t *conn);
int dbd_transaction_commit(dbi_conn_t *conn);
int dbd_transaction_rollback(dbi_conn_t *conn);
int dbd_savepoint(dbi_conn_t *conn, const char *savepoint);
int dbd_rollback_to_savepoint(dbi_conn_t *conn, const char *savepoint);
int dbd_release_savepoint(dbi_conn_t *conn, const char *savepoint);
size_t dbd_quote_string(dbi_driver_t *driver, const char *orig, char *dest) ; size_t dbd_quote_string(dbi_driver_t *driver, const char *orig, char *dest) ;
size_t dbd_quote_binary(dbi_conn_t *conn, const unsigned char *orig, size_t from_length, unsigned char **ptr_dest); size_t dbd_quote_binary(dbi_conn_t *conn, const unsigned char *orig, size_t from_length, unsigned char **ptr_dest);
size_t dbd_conn_quote_string(dbi_conn_t *conn, const char *orig, char *dest ); size_t dbd_conn_quote_string(dbi_conn_t *conn, const char *orig, char *dest );
const char *dbd_select_db(dbi_conn_t *conn, const char *db); const char *dbd_select_db(dbi_conn_t *conn, const char *db);
int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr); int dbd_geterror(dbi_conn_t *conn, int *err_no, char **errstr);
unsigned long long dbd_get_seq_last(dbi_conn_t *conn, const char *sequence) ; unsigned long long dbd_get_seq_last(dbi_conn_t *conn, const char *sequence) ;
unsigned long long dbd_get_seq_next(dbi_conn_t *conn, const char *sequence) ; unsigned long long dbd_get_seq_next(dbi_conn_t *conn, const char *sequence) ;
int dbd_ping(dbi_conn_t *conn); int dbd_ping(dbi_conn_t *conn);
/* _DBD_* DRIVER AUTHORS HELPER FUNCTIONS */ /* _DBD_* DRIVER AUTHORS HELPER FUNCTIONS */
dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned l ong long numrows_matched, unsigned long long numrows_affected); dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned l ong long numrows_matched, unsigned long long numrows_affected);
void _dbd_result_set_numfields(dbi_result_t *result, unsigned int numfields ); void _dbd_result_set_numfields(dbi_result_t *result, unsigned int numfields );
void _dbd_result_add_field(dbi_result_t *result, unsigned int fieldidx, cha r *name, unsigned short type, unsigned int attribs); void _dbd_result_add_field(dbi_result_t *result, unsigned int fieldidx, cha r *name, unsigned short type, unsigned int attribs);
dbi_row_t *_dbd_row_allocate(unsigned int numfields); dbi_row_t *_dbd_row_allocate(unsigned int numfields);
void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned long long rowidx); void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned long long rowidx);
void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, cons t int errno); void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, cons t int err_no);
dbi_result_t *_dbd_result_create_from_stringarray(dbi_conn_t *conn, unsigne d long long numrows_matched, const char **stringarray); dbi_result_t *_dbd_result_create_from_stringarray(dbi_conn_t *conn, unsigne d long long numrows_matched, const char **stringarray);
void _dbd_register_driver_cap(dbi_driver_t *driver, const char *capname, in t value); void _dbd_register_driver_cap(dbi_driver_t *driver, const char *capname, in t value);
void _dbd_register_conn_cap(dbi_conn_t *conn, const char *capname, int valu e); void _dbd_register_conn_cap(dbi_conn_t *conn, const char *capname, int valu e);
int _dbd_result_add_to_conn(dbi_result_t *result); int _dbd_result_add_to_conn(dbi_result_t *result);
time_t _dbd_parse_datetime(const char *raw, unsigned int attribs); time_t _dbd_parse_datetime(const char *raw, unsigned int attribs);
size_t _dbd_escape_chars(char *dest, const char *orig, size_t orig_size, co nst char *toescape); size_t _dbd_escape_chars(char *dest, const char *orig, size_t orig_size, co nst char *toescape);
size_t _dbd_encode_binary(const unsigned char *in, size_t n, unsigned char *out); size_t _dbd_encode_binary(const unsigned char *in, size_t n, unsigned char *out);
size_t _dbd_decode_binary(const unsigned char *in, unsigned char *out); size_t _dbd_decode_binary(const unsigned char *in, unsigned char *out);
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 6 change blocks. 
4 lines changed or deleted 11 lines changed or added


 dbi-dev.h   dbi-dev.h 
skipping to change at line 20 skipping to change at line 20
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
* $Id: dbi-dev.h,v 1.42 2008/01/15 00:21:25 mhoenicka Exp $ * $Id: dbi-dev.h,v 1.49 2013/01/08 23:54:30 mhoenicka Exp $
*/ */
#ifndef __DBI_DEV_H__ #ifndef __DBI_DEV_H__
#define __DBI_DEV_H__ #define __DBI_DEV_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "dirent.h" /* DIR definition */
#include <dbi/dbi.h> /* for dbi_conn_error_handler_func */ #include <dbi/dbi.h> /* for dbi_conn_error_handler_func */
/********************* /*********************
* SQL RELATED TYPES * * SQL RELATED TYPES *
*********************/ *********************/
/* to fool the compiler into letting us use the following structs before th ey're actually defined: */ /* to fool the compiler into letting us use the following structs before th ey're actually defined: */
typedef struct dbi_driver_s *dbi_driver_t_pointer; typedef struct dbi_driver_s *dbi_driver_t_pointer;
typedef struct dbi_inst_s *dbi_inst_t_pointer;
typedef struct dbi_conn_s *dbi_conn_t_pointer; typedef struct dbi_conn_s *dbi_conn_t_pointer;
typedef struct _field_binding_s *_field_binding_t_pointer; typedef struct _field_binding_s *_field_binding_t_pointer;
typedef union dbi_data_u { typedef union dbi_data_u {
char d_char; char d_char;
short d_short; short d_short;
int d_long; /* misnomer */ int d_long; /* misnomer */
long long d_longlong; long long d_longlong;
float d_float; float d_float;
double d_double; double d_double;
skipping to change at line 112 skipping to change at line 114
typedef struct dbi_option_s { typedef struct dbi_option_s {
char *key; char *key;
char *string_value; char *string_value;
int numeric_value; /* use this for port and other numeric settings * / int numeric_value; /* use this for port and other numeric settings * /
struct dbi_option_s *next; struct dbi_option_s *next;
} dbi_option_t; } dbi_option_t;
typedef struct dbi_functions_s { typedef struct dbi_functions_s {
void (*register_driver)(const dbi_info_t **, const char ***, const c har ***); void (*register_driver)(const dbi_info_t **, const char ***, const c har ***);
int (*initialize)(dbi_driver_t_pointer); int (*initialize)(dbi_driver_t_pointer);
int (*finalize)(dbi_driver_t_pointer);
int (*connect)(dbi_conn_t_pointer); int (*connect)(dbi_conn_t_pointer);
int (*disconnect)(dbi_conn_t_pointer); int (*disconnect)(dbi_conn_t_pointer);
int (*fetch_row)(dbi_result_t *, unsigned long long); int (*fetch_row)(dbi_result_t *, unsigned long long);
int (*free_query)(dbi_result_t *); int (*free_query)(dbi_result_t *);
int (*goto_row)(dbi_result_t *, unsigned long long); int (*goto_row)(dbi_result_t *, unsigned long long, unsigned long l ong);
int (*get_socket)(dbi_conn_t_pointer); int (*get_socket)(dbi_conn_t_pointer);
const char *(*get_encoding)(dbi_conn_t_pointer); const char *(*get_encoding)(dbi_conn_t_pointer);
dbi_result_t *(*list_dbs)(dbi_conn_t_pointer, const char *); dbi_result_t *(*list_dbs)(dbi_conn_t_pointer, const char *);
dbi_result_t *(*list_tables)(dbi_conn_t_pointer, const char *, const char *); dbi_result_t *(*list_tables)(dbi_conn_t_pointer, const char *, const char *);
dbi_result_t *(*query)(dbi_conn_t_pointer, const char *); dbi_result_t *(*query)(dbi_conn_t_pointer, const char *);
dbi_result_t *(*query_null)(dbi_conn_t_pointer, const unsigned char *, size_t); dbi_result_t *(*query_null)(dbi_conn_t_pointer, const unsigned char *, size_t);
int (*transaction_begin)(dbi_conn_t_pointer);
int (*transaction_commit)(dbi_conn_t_pointer);
int (*transaction_rollback)(dbi_conn_t_pointer);
int (*savepoint)(dbi_conn_t_pointer, const char *);
int (*rollback_to_savepoint)(dbi_conn_t_pointer, const char *);
int (*release_savepoint)(dbi_conn_t_pointer, const char *);
size_t (*quote_string)(dbi_driver_t_pointer, const char *, char *); size_t (*quote_string)(dbi_driver_t_pointer, const char *, char *);
size_t (*conn_quote_string)(dbi_conn_t_pointer, const char *, char * ); size_t (*conn_quote_string)(dbi_conn_t_pointer, const char *, char * );
size_t (*quote_binary)(dbi_conn_t_pointer, const unsigned char *, si ze_t, unsigned char **); size_t (*quote_binary)(dbi_conn_t_pointer, const unsigned char *, si ze_t, unsigned char **);
const char *(*encoding_to_iana)(const char *); const char *(*encoding_to_iana)(const char *);
const char *(*encoding_from_iana)(const char *); const char *(*encoding_from_iana)(const char *);
char *(*get_engine_version)(dbi_conn_t_pointer,char *); char *(*get_engine_version)(dbi_conn_t_pointer,char *);
const char *(*select_db)(dbi_conn_t_pointer, const char *); const char *(*select_db)(dbi_conn_t_pointer, const char *);
int (*geterror)(dbi_conn_t_pointer, int *, char **); int (*geterror)(dbi_conn_t_pointer, int *, char **);
unsigned long long (*get_seq_last)(dbi_conn_t_pointer, const char *) ; unsigned long long (*get_seq_last)(dbi_conn_t_pointer, const char *) ;
unsigned long long (*get_seq_next)(dbi_conn_t_pointer, const char *) ; unsigned long long (*get_seq_next)(dbi_conn_t_pointer, const char *) ;
skipping to change at line 150 skipping to change at line 159
} dbi_custom_function_t; } dbi_custom_function_t;
typedef struct dbi_driver_s { typedef struct dbi_driver_s {
void *dlhandle; void *dlhandle;
char *filename; /* full pathname */ char *filename; /* full pathname */
const dbi_info_t *info; const dbi_info_t *info;
dbi_functions_t *functions; dbi_functions_t *functions;
dbi_custom_function_t *custom_functions; dbi_custom_function_t *custom_functions;
const char **reserved_words; const char **reserved_words;
_capability_t *caps; _capability_t *caps;
dbi_inst_t_pointer dbi_inst; /* engine instance we are called from * /
struct dbi_driver_s *next; struct dbi_driver_s *next;
} dbi_driver_t; } dbi_driver_t;
typedef struct dbi_conn_s { typedef struct dbi_conn_s {
dbi_driver_t *driver; /* generic unchanging attributes shared by all instances of this conn */ dbi_driver_t *driver; /* generic unchanging attributes shared by all instances of this conn */
dbi_option_t *options; dbi_option_t *options;
_capability_t *caps; _capability_t *caps;
void *connection; /* will be typecast into conn-specific type */ void *connection; /* will be typecast into conn-specific type */
char *current_db; char *current_db;
dbi_error_flag error_flag; dbi_error_flag error_flag;
int error_number; /*XXX*/ int error_number; /*XXX*/
char *error_message; /*XXX*/ char *error_message; /*XXX*/
char *full_errmsg;
dbi_conn_error_handler_func error_handler; dbi_conn_error_handler_func error_handler;
void *error_handler_argument; void *error_handler_argument;
dbi_result_t **results; /* for garbage-collector-mandated result dis joins */ dbi_result_t **results; /* for garbage-collector-mandated result dis joins */
int results_used; int results_used;
int results_size; int results_size;
struct dbi_conn_s *next; /* so libdbi can unload all conns at exit * / struct dbi_conn_s *next; /* so libdbi can unload all conns at exit * /
} dbi_conn_t; } dbi_conn_t;
extern int dbi_verbosity;
unsigned int _isolate_attrib(unsigned int attribs, unsigned int rangemin, u nsigned int rangemax); unsigned int _isolate_attrib(unsigned int attribs, unsigned int rangemin, u nsigned int rangemax);
void _error_handler(dbi_conn_t *conn, dbi_error_flag errflag); void _error_handler(dbi_conn_t *conn, dbi_error_flag errflag);
void _reset_conn_error(dbi_conn_t *conn); void _reset_conn_error(dbi_conn_t *conn);
void _verbose_handler(dbi_conn_t *conn, const char* fmt, ...); void _verbose_handler(dbi_conn_t *conn, const char* fmt, ...);
void _logquery(dbi_conn_t *conn, const char* fmt, ...); void _logquery(dbi_conn_t *conn, const char* fmt, ...);
void _logquery_null(dbi_conn_t *conn, const char* statement, size_t st_leng th); void _logquery_null(dbi_conn_t *conn, const char* statement, size_t st_leng th);
int _disjoin_from_conn(dbi_result_t *result); int _disjoin_from_conn(dbi_result_t *result);
void _set_field_flag(dbi_row_t *row, unsigned int fieldidx, unsigned char f lag, unsigned char value); void _set_field_flag(dbi_row_t *row, unsigned int fieldidx, unsigned char f lag, unsigned char value);
int _get_field_flag(dbi_row_t *row, unsigned int fieldidx, unsigned char fl ag); int _get_field_flag(dbi_row_t *row, unsigned int fieldidx, unsigned char fl ag);
size_t _dirent_buf_size(DIR * dirp);
/******************************
* DBI INSTANCE RELATED TYPES *
******************************/
typedef struct dbi_inst_s {
dbi_driver_t *rootdriver;
dbi_conn_t *rootconn;
int dbi_verbosity;
} dbi_inst_t;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __DBI_DEV_H__ */ #endif /* __DBI_DEV_H__ */
 End of changes. 10 change blocks. 
4 lines changed or deleted 23 lines changed or added


 dbi.h   dbi.h 
skipping to change at line 20 skipping to change at line 20
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
* $Id: dbi.h.in,v 1.3 2008/02/06 19:34:27 mhoenicka Exp $ * $Id: dbi.h.in,v 1.13 2012/12/03 00:13:30 mhoenicka Exp $
*/ */
#ifndef __DBI_H__ #ifndef __DBI_H__
#define __DBI_H__ #define __DBI_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <time.h> #include <time.h>
#include <limits.h> /* for the *_MAX definitions */ #include <limits.h> /* for the *_MAX definitions */
#ifndef LIBDBI_API_DEPRECATED
#if defined _MSC_VER && _MSC_VER >= 1300 #if defined _MSC_VER && _MSC_VER >= 1300
#define LIBDBI_API_DEPRECATED __declspec(deprecated) #define LIBDBI_API_DEPRECATED __declspec(deprecated)
#elif defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) #elif defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
#define LIBDBI_API_DEPRECATED __attribute__((__deprecated__)) #define LIBDBI_API_DEPRECATED __attribute__((__deprecated__))
#else #else
#define LIBDBI_API_DEPRECATED #define LIBDBI_API_DEPRECATED /**/
#endif
#endif #endif
/* opaque type definitions */ /* opaque type definitions */
typedef void * dbi_inst;
typedef void * dbi_driver; typedef void * dbi_driver;
typedef void * dbi_conn; typedef void * dbi_conn;
typedef void * dbi_result; typedef void * dbi_result;
/* other type definitions */ /* other type definitions */
typedef enum { typedef enum {
DBI_ERROR_USER = -10, /* must be the first in the list */ DBI_ERROR_USER = -10, /* must be the first in the list */
DBI_ERROR_DBD = -9, DBI_ERROR_DBD = -9,
DBI_ERROR_BADOBJECT, DBI_ERROR_BADOBJECT,
DBI_ERROR_BADTYPE, DBI_ERROR_BADTYPE,
skipping to change at line 98 skipping to change at line 101
} dbi_time; } dbi_time;
typedef struct { typedef struct {
dbi_date date; dbi_date date;
dbi_time time; dbi_time time;
} dbi_datetime; } dbi_datetime;
/* function callback definitions */ /* function callback definitions */
typedef void (*dbi_conn_error_handler_func)(dbi_conn, void *); typedef void (*dbi_conn_error_handler_func)(dbi_conn, void *);
/* definitions of the library interface versions */ /* definitions of the libtool library interface versions */
#define LIBDBI_LIB_CURRENT 1 #define LIBDBI_LIB_CURRENT 2
#define LIBDBI_LIB_REVISION 0 #define LIBDBI_LIB_REVISION 0
#define LIBDBI_LIB_AGE 0 #define LIBDBI_LIB_AGE 1
/* definition of the libdbi version */
#define LIBDBI_VERSION ((0 * 10000) + (9 * 100) + (0))
/* values for the int in field_types[] */ /* values for the int in field_types[] */
#define DBI_TYPE_INTEGER 1 #define DBI_TYPE_INTEGER 1
#define DBI_TYPE_DECIMAL 2 #define DBI_TYPE_DECIMAL 2
#define DBI_TYPE_STRING 3 #define DBI_TYPE_STRING 3
#define DBI_TYPE_BINARY 4 #define DBI_TYPE_BINARY 4
#define DBI_TYPE_DATETIME 5 #define DBI_TYPE_DATETIME 5
/* values for the bitmask in field_type_attributes[] */ /* values for the bitmask in field_type_attributes[] */
#define DBI_INTEGER_UNSIGNED (1 << 0) #define DBI_INTEGER_UNSIGNED (1 << 0)
skipping to change at line 160 skipping to change at line 166
/* error code for field attribute retrieval functions */ /* error code for field attribute retrieval functions */
#define DBI_FIELD_FLAG_ERROR -1 #define DBI_FIELD_FLAG_ERROR -1
/* error code for bind* functions */ /* error code for bind* functions */
#define DBI_BIND_ERROR -1 #define DBI_BIND_ERROR -1
/* needed by get_engine_version functions */ /* needed by get_engine_version functions */
#define VERSIONSTRING_LENGTH 32 #define VERSIONSTRING_LENGTH 32
int dbi_initialize(const char *driverdir); int dbi_initialize_r(const char *driverdir, dbi_inst *pInst);
void dbi_shutdown(); int LIBDBI_API_DEPRECATED dbi_initialize(const char *driverdir);
void dbi_shutdown_r(dbi_inst Inst);
void LIBDBI_API_DEPRECATED dbi_shutdown();
const char *dbi_version(); const char *dbi_version();
int dbi_set_verbosity(int verbosity); unsigned int dbi_version_numeric();
int dbi_set_verbosity_r(int verbosity, dbi_inst Inst);
dbi_driver dbi_driver_list(dbi_driver Current); /* returns next driver. if int LIBDBI_API_DEPRECATED dbi_set_verbosity(int verbosity);
current is NULL, return first driver. */
dbi_driver dbi_driver_open(const char *name); /* goes thru linked list unti dbi_driver dbi_driver_list_r(dbi_driver Current, dbi_inst Inst);
l it finds the right one */ dbi_driver LIBDBI_API_DEPRECATED dbi_driver_list(dbi_driver Current); /* re
turns next driver. if current is NULL, return first driver. */
dbi_driver dbi_driver_open_r(const char *name, dbi_inst Inst);
dbi_driver LIBDBI_API_DEPRECATED dbi_driver_open(const char *name); /* goes
thru linked list until it finds the right one */
dbi_inst dbi_driver_get_instance(dbi_driver Driver);
int dbi_driver_is_reserved_word(dbi_driver Driver, const char *word); int dbi_driver_is_reserved_word(dbi_driver Driver, const char *word);
void *dbi_driver_specific_function(dbi_driver Driver, const char *name); void *dbi_driver_specific_function(dbi_driver Driver, const char *name);
size_t LIBDBI_API_DEPRECATED dbi_driver_quote_string_copy(dbi_driver Driver , const char *orig, char **newstr); size_t LIBDBI_API_DEPRECATED dbi_driver_quote_string_copy(dbi_driver Driver , const char *orig, char **newstr);
size_t LIBDBI_API_DEPRECATED dbi_driver_quote_string(dbi_driver Driver, cha r **orig); size_t LIBDBI_API_DEPRECATED dbi_driver_quote_string(dbi_driver Driver, cha r **orig);
const char* dbi_driver_encoding_from_iana(dbi_driver Driver, const char* ia na_encoding); const char* dbi_driver_encoding_from_iana(dbi_driver Driver, const char* ia na_encoding);
const char* dbi_driver_encoding_to_iana(dbi_driver Driver, const char* db_e ncoding); const char* dbi_driver_encoding_to_iana(dbi_driver Driver, const char* db_e ncoding);
int dbi_driver_cap_get(dbi_driver Driver, const char *capname); int dbi_driver_cap_get(dbi_driver Driver, const char *capname);
const char *dbi_driver_get_name(dbi_driver Driver); const char *dbi_driver_get_name(dbi_driver Driver);
const char *dbi_driver_get_filename(dbi_driver Driver); const char *dbi_driver_get_filename(dbi_driver Driver);
const char *dbi_driver_get_description(dbi_driver Driver); const char *dbi_driver_get_description(dbi_driver Driver);
const char *dbi_driver_get_maintainer(dbi_driver Driver); const char *dbi_driver_get_maintainer(dbi_driver Driver);
const char *dbi_driver_get_url(dbi_driver Driver); const char *dbi_driver_get_url(dbi_driver Driver);
const char *dbi_driver_get_version(dbi_driver Driver); const char *dbi_driver_get_version(dbi_driver Driver);
const char *dbi_driver_get_date_compiled(dbi_driver Driver); const char *dbi_driver_get_date_compiled(dbi_driver Driver);
dbi_conn dbi_conn_new(const char *name); /* shortcut for dbi_conn_open(dbi_ dbi_conn dbi_conn_new_r(const char *name, dbi_inst Inst);
driver_open("foo")) */ dbi_conn LIBDBI_API_DEPRECATED dbi_conn_new(const char *name); /* shortcut
for dbi_conn_open(dbi_driver_open("foo")) */
dbi_conn dbi_conn_open(dbi_driver Driver); /* returns an actual instance of the conn */ dbi_conn dbi_conn_open(dbi_driver Driver); /* returns an actual instance of the conn */
dbi_driver dbi_conn_get_driver(dbi_conn Conn); dbi_driver dbi_conn_get_driver(dbi_conn Conn);
int dbi_conn_set_option(dbi_conn Conn, const char *key, const char *value); /* if value is NULL, remove option from list */ int dbi_conn_set_option(dbi_conn Conn, const char *key, const char *value); /* if value is NULL, remove option from list */
int dbi_conn_set_option_numeric(dbi_conn Conn, const char *key, int value); int dbi_conn_set_option_numeric(dbi_conn Conn, const char *key, int value);
const char *dbi_conn_get_option(dbi_conn Conn, const char *key); const char *dbi_conn_get_option(dbi_conn Conn, const char *key);
int dbi_conn_get_option_numeric(dbi_conn Conn, const char *key); int dbi_conn_get_option_numeric(dbi_conn Conn, const char *key);
const char *dbi_conn_require_option(dbi_conn Conn, const char *key); /* lik e get, but generate an error if key isn't found */ const char *dbi_conn_require_option(dbi_conn Conn, const char *key); /* lik e get, but generate an error if key isn't found */
int dbi_conn_require_option_numeric(dbi_conn Conn, const char *key); /* dit to */ int dbi_conn_require_option_numeric(dbi_conn Conn, const char *key); /* dit to */
const char *dbi_conn_get_option_list(dbi_conn Conn, const char *current); / * returns key of next option, or the first option key if current is NULL */ const char *dbi_conn_get_option_list(dbi_conn Conn, const char *current); / * returns key of next option, or the first option key if current is NULL */
void dbi_conn_clear_option(dbi_conn Conn, const char *key); void dbi_conn_clear_option(dbi_conn Conn, const char *key);
skipping to change at line 225 skipping to change at line 239
unsigned long long dbi_conn_sequence_last(dbi_conn Conn, const char *name); /* name of the sequence or table */ unsigned long long dbi_conn_sequence_last(dbi_conn Conn, const char *name); /* name of the sequence or table */
unsigned long long dbi_conn_sequence_next(dbi_conn Conn, const char *name); unsigned long long dbi_conn_sequence_next(dbi_conn Conn, const char *name);
int dbi_conn_ping(dbi_conn Conn); int dbi_conn_ping(dbi_conn Conn);
size_t dbi_conn_quote_string_copy(dbi_conn Conn, const char *orig, char **n ewstr); size_t dbi_conn_quote_string_copy(dbi_conn Conn, const char *orig, char **n ewstr);
size_t dbi_conn_quote_string(dbi_conn Conn, char **orig); size_t dbi_conn_quote_string(dbi_conn Conn, char **orig);
size_t dbi_conn_quote_binary_copy(dbi_conn Conn, const unsigned char *orig, size_t from_length, unsigned char **newstr); size_t dbi_conn_quote_binary_copy(dbi_conn Conn, const unsigned char *orig, size_t from_length, unsigned char **newstr);
size_t dbi_conn_escape_string_copy(dbi_conn Conn, const char *orig, char ** newstr); size_t dbi_conn_escape_string_copy(dbi_conn Conn, const char *orig, char ** newstr);
size_t dbi_conn_escape_string(dbi_conn Conn, char **orig); size_t dbi_conn_escape_string(dbi_conn Conn, char **orig);
size_t dbi_conn_escape_binary_copy(dbi_conn Conn, const unsigned char *orig , size_t from_length, unsigned char **newstr); size_t dbi_conn_escape_binary_copy(dbi_conn Conn, const unsigned char *orig , size_t from_length, unsigned char **newstr);
int dbi_conn_transaction_begin(dbi_conn Conn);
int dbi_conn_transaction_commit(dbi_conn Conn);
int dbi_conn_transaction_rollback(dbi_conn Conn);
int dbi_conn_savepoint(dbi_conn Conn, const char *savepoint);
int dbi_conn_rollback_to_savepoint(dbi_conn Conn, const char *savepoint);
int dbi_conn_release_savepoint(dbi_conn Conn, const char *savepoint);
dbi_conn dbi_result_get_conn(dbi_result Result); dbi_conn dbi_result_get_conn(dbi_result Result);
int dbi_result_free(dbi_result Result); int dbi_result_free(dbi_result Result);
int dbi_result_seek_row(dbi_result Result, unsigned long long rowidx); int dbi_result_seek_row(dbi_result Result, unsigned long long rowidx);
int dbi_result_first_row(dbi_result Result); int dbi_result_first_row(dbi_result Result);
int dbi_result_last_row(dbi_result Result); int dbi_result_last_row(dbi_result Result);
int dbi_result_has_prev_row(dbi_result Result); int dbi_result_has_prev_row(dbi_result Result);
int dbi_result_prev_row(dbi_result Result); int dbi_result_prev_row(dbi_result Result);
int dbi_result_has_next_row(dbi_result Result); int dbi_result_has_next_row(dbi_result Result);
int dbi_result_next_row(dbi_result Result); int dbi_result_next_row(dbi_result Result);
unsigned long long dbi_result_get_currow(dbi_result Result); unsigned long long dbi_result_get_currow(dbi_result Result);
skipping to change at line 325 skipping to change at line 346
double dbi_result_get_double_idx(dbi_result Result, unsigned int fieldidx); double dbi_result_get_double_idx(dbi_result Result, unsigned int fieldidx);
const char *dbi_result_get_string_idx(dbi_result Result, unsigned int field idx); const char *dbi_result_get_string_idx(dbi_result Result, unsigned int field idx);
const unsigned char *dbi_result_get_binary_idx(dbi_result Result, unsigned int fieldidx); const unsigned char *dbi_result_get_binary_idx(dbi_result Result, unsigned int fieldidx);
char *dbi_result_get_string_copy_idx(dbi_result Result, unsigned int fieldi dx); char *dbi_result_get_string_copy_idx(dbi_result Result, unsigned int fieldi dx);
unsigned char *dbi_result_get_binary_copy_idx(dbi_result Result, unsigned i nt fieldidx); unsigned char *dbi_result_get_binary_copy_idx(dbi_result Result, unsigned i nt fieldidx);
time_t dbi_result_get_datetime_idx(dbi_result Result, unsigned int fieldidx ); time_t dbi_result_get_datetime_idx(dbi_result Result, unsigned int fieldidx );
/* get_as* functions */
long long dbi_result_get_as_longlong(dbi_result Result, const char *fieldna
me);
long long dbi_result_get_as_longlong_idx(dbi_result Result, unsigned int fi
eldidx);
char *dbi_result_get_as_string_copy(dbi_result Result, const char *fieldnam
e);
char *dbi_result_get_as_string_copy_idx(dbi_result Result, unsigned int fie
ldidx);
/* /*
int dbi_result_bind_char_idx(dbi_result Result, unsigned int fieldidx, char *bindto); int dbi_result_bind_char_idx(dbi_result Result, unsigned int fieldidx, char *bindto);
int dbi_result_bind_uchar_idx(dbi_result Result, unsigned int fieldidx, uns igned char *bindto); int dbi_result_bind_uchar_idx(dbi_result Result, unsigned int fieldidx, uns igned char *bindto);
int dbi_result_bind_short_idx(dbi_result Result, unsigned int fieldidx, sho rt *bindto); int dbi_result_bind_short_idx(dbi_result Result, unsigned int fieldidx, sho rt *bindto);
int dbi_result_bind_ushort_idx(dbi_result Result, unsigned int fieldidx, un signed short *bindto); int dbi_result_bind_ushort_idx(dbi_result Result, unsigned int fieldidx, un signed short *bindto);
int dbi_result_bind_long_idx(dbi_result Result, unsigned int fieldidx, long *bindto); int dbi_result_bind_long_idx(dbi_result Result, unsigned int fieldidx, long *bindto);
int dbi_result_bind_ulong_idx(dbi_result Result, unsigned int fieldidx, uns igned long *bindto); int dbi_result_bind_ulong_idx(dbi_result Result, unsigned int fieldidx, uns igned long *bindto);
int dbi_result_bind_longlong_idx(dbi_result Result, unsigned int fieldidx, long long *bindto); int dbi_result_bind_longlong_idx(dbi_result Result, unsigned int fieldidx, long long *bindto);
int dbi_result_bind_ulonglong_idx(dbi_result Result, unsigned int fieldidx, unsigned long long *bindto); int dbi_result_bind_ulonglong_idx(dbi_result Result, unsigned int fieldidx, unsigned long long *bindto);
 End of changes. 11 change blocks. 
15 lines changed or deleted 46 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/