odbx.h   odbx.h 
skipping to change at line 32 skipping to change at line 32
#include <sys/time.h> #include <sys/time.h>
#ifndef ODBX_H #ifndef ODBX_H
#define ODBX_H #define ODBX_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* /*
* ODBX data types * ODBX (SQL2003) data types
*/ */
#define ODBX_INT1 0x00 #define ODBX_BOOLEAN 0x00
#define ODBX_INT2 0x01 #define ODBX_SMALLINT 0x01
#define ODBX_INT4 0x02 #define ODBX_INTEGER 0x02
#define ODBX_INT8 0x03 #define ODBX_BIGINT 0x03
#define ODBX_FLOAT4 0x08 #define ODBX_DECIMAL 0x07
#define ODBX_FLOAT8 0x09
#define ODBX_STRING 0x10 #define ODBX_REAL 0x08
#define ODBX_BINARY 0x11 #define ODBX_DOUBLE 0x09
#define ODBX_FLOAT 0x0f
#define ODBX_CHAR 0x10
#define ODBX_NCHAR 0x11
#define ODBX_VARCHAR 0x12
#define ODBX_NVARCHAR 0x13
#define ODBX_CLOB 0x20
#define ODBX_NCLOB 0x21
#define ODBX_XML 0x22
#define ODBX_BLOB 0x2f
#define ODBX_TIME 0x30
#define ODBX_TIME_TZ 0x31
#define ODBX_TIMESTAMP 0x32
#define ODBX_TIMESTAMP_TZ 0x33
#define ODBX_DATE 0x34
#define ODBX_INTERVAL 0x35
#define ODBX_ARRAY 0x40
#define ODBX_MULTISET 0x41
#define ODBX_DATALINK 0x50
#define ODBX_UNKNOWN 0xff
/* /*
* Extended capabilities supported by the backends * Extended capabilities supported by the backends
* 0x0000-0x00ff: Well known capabilities * 0x0000-0x00ff: Well known capabilities
*/ */
#define ODBX_CAP_LO 0x0000 #define ODBX_CAP_BASIC 0x0000
#define ODBX_CAP_PREP 0x0001
/* /*
* ODBX error types * ODBX error types
*/ */
#define ODBX_ERR_SUCCESS 0x00 #define ODBX_ERR_SUCCESS 0x00
#define OBBX_ERR_BACKEND 0x01 #define ODBX_ERR_BACKEND 0x01
#define ODBX_ERR_NOCAP 0x02 #define ODBX_ERR_NOCAP 0x02
#define ODBX_ERR_PARAM 0x03 #define ODBX_ERR_PARAM 0x03
#define ODBX_ERR_NOMEM 0x04 #define ODBX_ERR_NOMEM 0x04
#define ODBX_ERR_TOOLONG 0x05 #define ODBX_ERR_TOOLONG 0x05
#define ODBX_ERR_NOTEXIST 0x06 #define ODBX_ERR_NOTEXIST 0x06
#define ODBX_ERR_NOOP 0x07 #define ODBX_ERR_NOOP 0x07
#define ODBX_ERR_OPTRO 0x08 #define ODBX_ERR_OPTION 0x08
#define ODBX_ERR_OPTWR 0x09 #define ODBX_ERR_OPTRO 0x09
#define ODBX_ERR_RESULT 0x0a #define ODBX_ERR_OPTWR 0x0a
#define ODBX_ERR_RESULT 0x0b
#define ODBX_MAX_ERRNO 0x0a #define ODBX_MAX_ERRNO 0x0b
/* /*
* ODBX options * ODBX options
*
* 0x0000 - 0x1fff reserved for api options * 0x0000 - 0x1fff reserved for api options
* 0x2000 - 0x3fff reserved for api extension options * 0x2000 - 0x3fff reserved for api extension options
* 0x4000 - 0xffff reserved for vendor specific and experimental options * 0x4000 - 0xffff reserved for vendor specific and experimental options
*
* Always use the names. The numbers may change!
*/ */
#define ODBX_OPT_ON ((void*) 1)
#define ODBX_OPT_OFF ((void*) 0)
/* /*
* Informational options * Informational options
*/ */
#define ODBX_OPT_API_VERSION 0x0000 #define ODBX_OPT_API_VERSION 0x0000
#define ODBX_OPT_THREAD_SAFE 0x0001 #define ODBX_OPT_THREAD_SAFE 0x0001
/* /*
* Security related options * Security related options
*/ */
#define ODBX_TLS_NEVER 0x00 #define ODBX_TLS_NEVER 0x00
#define ODBX_TLS_TRY 0x01 #define ODBX_TLS_TRY 0x01
#define ODBX_TLS_ALWAYS 0x02 #define ODBX_TLS_ALWAYS 0x02
#define ODBX_OPT_TLS 0x0010 #define ODBX_OPT_TLS 0x0010
/* /*
* Implemented options * Implemented options
*/ */
#define ODBX_OPT_MULTI_STATEMENTS 0x0020 #define ODBX_OPT_MULTI_STATEMENTS 0x0020
#define ODBX_OPT_PAGED_RESULTS 0x0021 #define ODBX_OPT_PAGED_RESULTS 0x0021
#define ODBX_OPT_COMPRESS 0x0022 #define ODBX_OPT_COMPRESS 0x0022
typedef struct odbx_t odbx_t; typedef struct odbx_t odbx_t;
typedef struct odbx_result_t odbx_result_t; typedef struct odbx_result_t odbx_result_t;
/* /*
* ODBX basic operations * ODBX basic operations
*/ */
int odbx_init( odbx_t** handle, const char* backend, const char* host, cons t char* port ); int odbx_init( odbx_t** handle, const char* backend, const char* host, cons t char* port );
skipping to change at line 128 skipping to change at line 150
int odbx_unbind( odbx_t* handle ); int odbx_unbind( odbx_t* handle );
int odbx_finish( odbx_t* handle ); int odbx_finish( odbx_t* handle );
int odbx_capabilities( odbx_t* handle, unsigned int cap ); int odbx_capabilities( odbx_t* handle, unsigned int cap );
int odbx_get_option( odbx_t* handle, unsigned int option, void* value ); int odbx_get_option( odbx_t* handle, unsigned int option, void* value );
int odbx_set_option( odbx_t* handle, unsigned int option, void* value ); int odbx_set_option( odbx_t* handle, unsigned int option, void* value );
const char* odbx_error( odbx_t* handle, int errno ); const char* odbx_error( odbx_t* handle, int error );
int odbx_escape( odbx_t* handle, const char* from, unsigned long fromlen, c har* to, unsigned long* tolen ); int odbx_escape( odbx_t* handle, const char* from, unsigned long fromlen, c har* to, unsigned long* tolen );
int odbx_query( odbx_t* handle, const char* query, unsigned long length ); int odbx_query( odbx_t* handle, const char* query, unsigned long length );
int odbx_result( odbx_t* handle, odbx_result_t** result, struct timeval* ti meout, unsigned long chunk ); int odbx_result( odbx_t* handle, odbx_result_t** result, struct timeval* ti meout, unsigned long chunk );
void odbx_result_free( odbx_result_t* result ); void odbx_result_free( odbx_result_t* result );
int odbx_row_fetch( odbx_result_t* result ); int odbx_row_fetch( odbx_result_t* result );
uint64_t odbx_rows_affected( odbx_result_t* result ); uint64_t odbx_rows_affected( odbx_result_t* result );
unsigned long odbx_field_count( odbx_result_t* result ); unsigned long odbx_column_count( odbx_result_t* result );
unsigned long odbx_field_length( odbx_result_t* result, unsigned long pos ) ; const char* odbx_column_name( odbx_result_t* result, unsigned long pos );
char* odbx_field_name( odbx_result_t* result, unsigned long pos ); int odbx_column_type( odbx_result_t* result, unsigned long pos );
char* odbx_field_value( odbx_result_t* result, unsigned long pos ); unsigned long odbx_field_length( odbx_result_t* result, unsigned long pos ) ;
int odbx_field_type( odbx_result_t* result, unsigned long pos ); const char* odbx_field_value( odbx_result_t* result, unsigned long pos );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 16 change blocks. 
38 lines changed or deleted 60 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/