libdrizzle Developer Documentation

Drizzle Constants

Defines

#define DRIZZLE_DEFAULT_TCP_HOST   "127.0.0.1"
#define DRIZZLE_DEFAULT_TCP_PORT   4427
#define DRIZZLE_DEFAULT_TCP_PORT_MYSQL   3306
#define DRIZZLE_DEFAULT_UDS   "/tmp/mysql.sock"
#define DRIZZLE_DEFAULT_USER   "root"
#define DRIZZLE_MAX_ERROR_SIZE   2048
#define DRIZZLE_MAX_USER_SIZE   64
#define DRIZZLE_MAX_PASSWORD_SIZE   32
#define DRIZZLE_MAX_DB_SIZE   64
#define DRIZZLE_MAX_INFO_SIZE   2048
#define DRIZZLE_MAX_SQLSTATE_SIZE   5
#define DRIZZLE_MAX_CATALOG_SIZE   128
#define DRIZZLE_MAX_TABLE_SIZE   128
#define DRIZZLE_MAX_COLUMN_NAME_SIZE   2048
#define DRIZZLE_MAX_DEFAULT_VALUE_SIZE   2048
#define DRIZZLE_MAX_PACKET_SIZE   UINT32_MAX
#define DRIZZLE_MAX_BUFFER_SIZE   32768
#define DRIZZLE_BUFFER_COPY_THRESHOLD   8192
#define DRIZZLE_MAX_SERVER_VERSION_SIZE   32
#define DRIZZLE_MAX_SCRAMBLE_SIZE   20
#define DRIZZLE_STATE_STACK_SIZE   8
#define DRIZZLE_ROW_GROW_SIZE   8192
#define DRIZZLE_DEFAULT_SOCKET_TIMEOUT   10
#define DRIZZLE_DEFAULT_SOCKET_SEND_SIZE   32768
#define DRIZZLE_DEFAULT_SOCKET_RECV_SIZE   32768
#define DRIZZLE_RETURN_SERVER_GONE   DRIZZLE_RETURN_LOST_CONNECTION
#define DRIZZLE_RETURN_EOF   DRIZZLE_RETURN_LOST_CONNECTION
#define DRIZZLE_COLUMN_TYPE_VIRTUAL   17
#define DRIZZLE_ERROR_SET(__drizzle, __function,...)
#define DRIZZLE_GET_BYTE2(__buffer)
#define DRIZZLE_GET_BYTE3(__buffer)
#define DRIZZLE_GET_BYTE4(__buffer)
#define DRIZZLE_GET_BYTE8(__buffer)
#define DRIZZLE_SET_BYTE2(__buffer, __int)
#define DRIZZLE_SET_BYTE3(__buffer, __int)
#define DRIZZLE_SET_BYTE4(__buffer, __int)
#define DRIZZLE_SET_BYTE8(__buffer, __int)
#define DRIZZLE_MB_CHAR(__c)   (((__c) & 0x80) != 0)
#define DRIZZLE_MB_LENGTH(__c)
#define DRIZZLE_STATE_NONE(__con)   ((__con)->state_current == 0)
#define DRIZZLE_STATE_PUSH(__con, __function)
#define DRIZZLE_STATE_POP(__con)   (__con)->state_current--;
#define DRIZZLE_STATE_RESET(__con)   (__con)->state_current= 0;
#define PDEBUG(__function, __format,...)

Typedefs

typedef char * drizzle_field_t
typedef drizzle_field_tdrizzle_row_t
typedef uint8_t drizzle_charset_t
typedef drizzle_return_tdrizzle_state_fn )(drizzle_con_st *con)
typedef void( drizzle_con_data_free_fn )(drizzle_con_st *con, void *data)
typedef void( drizzle_query_data_free_fn )(drizzle_query_st *query, void *data)
typedef drizzle_return_tdrizzle_event_watch_fn )(drizzle_con_st *con, short events, void *arg)

Enumerations

enum  drizzle_return_t {
  DRIZZLE_RETURN_OK, DRIZZLE_RETURN_IO_WAIT, DRIZZLE_RETURN_PAUSE, DRIZZLE_RETURN_ROW_BREAK,
  DRIZZLE_RETURN_MEMORY, DRIZZLE_RETURN_ERRNO, DRIZZLE_RETURN_INTERNAL_ERROR, DRIZZLE_RETURN_GETADDRINFO,
  DRIZZLE_RETURN_NOT_READY, DRIZZLE_RETURN_BAD_PACKET_NUMBER, DRIZZLE_RETURN_BAD_HANDSHAKE_PACKET, DRIZZLE_RETURN_BAD_PACKET,
  DRIZZLE_RETURN_PROTOCOL_NOT_SUPPORTED, DRIZZLE_RETURN_UNEXPECTED_DATA, DRIZZLE_RETURN_NO_SCRAMBLE, DRIZZLE_RETURN_AUTH_FAILED,
  DRIZZLE_RETURN_NULL_SIZE, DRIZZLE_RETURN_ERROR_CODE, DRIZZLE_RETURN_TOO_MANY_COLUMNS, DRIZZLE_RETURN_ROW_END,
  DRIZZLE_RETURN_LOST_CONNECTION, DRIZZLE_RETURN_COULD_NOT_CONNECT, DRIZZLE_RETURN_NO_ACTIVE_CONNECTIONS, DRIZZLE_RETURN_HANDSHAKE_FAILED,
  DRIZZLE_RETURN_MAX
}

Define Documentation

#define DRIZZLE_DEFAULT_TCP_HOST   "127.0.0.1"

Definition at line 29 of file constants.h.

#define DRIZZLE_DEFAULT_TCP_PORT   4427

Definition at line 30 of file constants.h.

#define DRIZZLE_DEFAULT_TCP_PORT_MYSQL   3306

Definition at line 31 of file constants.h.

#define DRIZZLE_DEFAULT_UDS   "/tmp/mysql.sock"

Definition at line 32 of file constants.h.

#define DRIZZLE_DEFAULT_USER   "root"

Definition at line 33 of file constants.h.

#define DRIZZLE_MAX_ERROR_SIZE   2048

Definition at line 34 of file constants.h.

#define DRIZZLE_MAX_USER_SIZE   64

Definition at line 35 of file constants.h.

#define DRIZZLE_MAX_PASSWORD_SIZE   32

Definition at line 36 of file constants.h.

#define DRIZZLE_MAX_DB_SIZE   64

Definition at line 37 of file constants.h.

#define DRIZZLE_MAX_INFO_SIZE   2048

Definition at line 38 of file constants.h.

#define DRIZZLE_MAX_SQLSTATE_SIZE   5

Definition at line 39 of file constants.h.

#define DRIZZLE_MAX_CATALOG_SIZE   128

Definition at line 40 of file constants.h.

#define DRIZZLE_MAX_TABLE_SIZE   128

Definition at line 41 of file constants.h.

#define DRIZZLE_MAX_COLUMN_NAME_SIZE   2048

Definition at line 42 of file constants.h.

#define DRIZZLE_MAX_DEFAULT_VALUE_SIZE   2048

Definition at line 43 of file constants.h.

#define DRIZZLE_MAX_PACKET_SIZE   UINT32_MAX

Definition at line 44 of file constants.h.

#define DRIZZLE_MAX_BUFFER_SIZE   32768

Definition at line 45 of file constants.h.

#define DRIZZLE_BUFFER_COPY_THRESHOLD   8192

Definition at line 46 of file constants.h.

#define DRIZZLE_MAX_SERVER_VERSION_SIZE   32

Definition at line 47 of file constants.h.

#define DRIZZLE_MAX_SCRAMBLE_SIZE   20

Definition at line 48 of file constants.h.

#define DRIZZLE_STATE_STACK_SIZE   8

Definition at line 49 of file constants.h.

#define DRIZZLE_ROW_GROW_SIZE   8192

Definition at line 50 of file constants.h.

#define DRIZZLE_DEFAULT_SOCKET_TIMEOUT   10

Definition at line 51 of file constants.h.

#define DRIZZLE_DEFAULT_SOCKET_SEND_SIZE   32768

Definition at line 52 of file constants.h.

#define DRIZZLE_DEFAULT_SOCKET_RECV_SIZE   32768

Definition at line 53 of file constants.h.

#define DRIZZLE_RETURN_SERVER_GONE   DRIZZLE_RETURN_LOST_CONNECTION

Definition at line 98 of file constants.h.

#define DRIZZLE_RETURN_EOF   DRIZZLE_RETURN_LOST_CONNECTION

Definition at line 99 of file constants.h.

#define DRIZZLE_COLUMN_TYPE_VIRTUAL   17

Definition at line 100 of file constants.h.

#define DRIZZLE_ERROR_SET ( __drizzle,
__function,
...   ) 
Value:
{ \
  snprintf((__drizzle)->last_error, DRIZZLE_MAX_ERROR_SIZE, \
           __function ":" __VA_ARGS__); }

Macro to set error string.

Definition at line 31 of file private.h.

#define DRIZZLE_GET_BYTE2 ( __buffer   ) 
Value:
(uint16_t)((__buffer)[0] | \
  ((__buffer)[1] << 8))

Definition at line 36 of file private.h.

#define DRIZZLE_GET_BYTE3 ( __buffer   ) 
Value:
(uint32_t)((__buffer)[0] | \
  ((__buffer)[1] << 8) | ((__buffer)[2] << 16))

Definition at line 38 of file private.h.

#define DRIZZLE_GET_BYTE4 ( __buffer   ) 
Value:
(uint32_t)((__buffer)[0] | \
  ((__buffer)[1] << 8) | ((__buffer)[2] << 16) | ((__buffer)[3] << 24))

Definition at line 40 of file private.h.

#define DRIZZLE_GET_BYTE8 ( __buffer   ) 
Value:
((uint64_t)(__buffer)[0] | \
  ((uint64_t)(__buffer)[1] << 8) | ((uint64_t)(__buffer)[2] << 16) | \
  ((uint64_t)(__buffer)[3] << 24) | ((uint64_t)(__buffer)[4] << 32) | \
  ((uint64_t)(__buffer)[5] << 40) | ((uint64_t)(__buffer)[6] << 48) | \
  ((uint64_t)(__buffer)[7] << 56))

Definition at line 42 of file private.h.

#define DRIZZLE_SET_BYTE2 ( __buffer,
__int   ) 
Value:
{ \
  (__buffer)[0]= (uint8_t)((__int) & 0xFF); \
  (__buffer)[1]= (uint8_t)(((__int) >> 8) & 0xFF); }

Definition at line 49 of file private.h.

#define DRIZZLE_SET_BYTE3 ( __buffer,
__int   ) 
Value:
{ \
  (__buffer)[0]= (uint8_t)((__int) & 0xFF); \
  (__buffer)[1]= (uint8_t)(((__int) >> 8) & 0xFF); \
  (__buffer)[2]= (uint8_t)(((__int) >> 16) & 0xFF); }

Definition at line 52 of file private.h.

#define DRIZZLE_SET_BYTE4 ( __buffer,
__int   ) 
Value:
{ \
  (__buffer)[0]= (uint8_t)((__int) & 0xFF); \
  (__buffer)[1]= (uint8_t)(((__int) >> 8) & 0xFF); \
  (__buffer)[2]= (uint8_t)(((__int) >> 16) & 0xFF); \
  (__buffer)[3]= (uint8_t)(((__int) >> 24) & 0xFF); }

Definition at line 56 of file private.h.

#define DRIZZLE_SET_BYTE8 ( __buffer,
__int   ) 
Value:
{ \
  (__buffer)[0]= (uint8_t)((__int) & 0xFF); \
  (__buffer)[1]= (uint8_t)(((__int) >> 8) & 0xFF); \
  (__buffer)[2]= (uint8_t)(((__int) >> 16) & 0xFF); \
  (__buffer)[3]= (uint8_t)(((__int) >> 24) & 0xFF); \
  (__buffer)[4]= (uint8_t)(((__int) >> 32) & 0xFF); \
  (__buffer)[5]= (uint8_t)(((__int) >> 40) & 0xFF); \
  (__buffer)[6]= (uint8_t)(((__int) >> 48) & 0xFF); \
  (__buffer)[7]= (uint8_t)(((__int) >> 56) & 0xFF); }

Definition at line 61 of file private.h.

#define DRIZZLE_MB_CHAR ( __c   )     (((__c) & 0x80) != 0)

Definition at line 72 of file private.h.

#define DRIZZLE_MB_LENGTH ( __c   ) 
Value:
((uint32_t)(__c) <= 0x7f ? 1 : \
  ((uint32_t)(__c) <= 0x7ff ? 2 : \
  ((uint32_t)(__c) <= 0xd7ff ? 3 : \
  ((uint32_t)(__c) <= 0xdfff || (uint32_t)(__c) > 0x10ffff ? 0 : \
  ((uint32_t)(__c) <= 0xffff ? 3 : 4)))))

Definition at line 73 of file private.h.

#define DRIZZLE_STATE_NONE ( __con   )     ((__con)->state_current == 0)

Definition at line 81 of file private.h.

#define DRIZZLE_STATE_PUSH ( __con,
__function   ) 
Value:
{ \
  assert((__con)->state_current < DRIZZLE_STATE_STACK_SIZE); \
  (__con)->state_stack[(__con)->state_current]= __function; \
  (__con)->state_current++; }

Definition at line 82 of file private.h.

#define DRIZZLE_STATE_POP ( __con   )     (__con)->state_current--;

Definition at line 86 of file private.h.

#define DRIZZLE_STATE_RESET ( __con   )     (__con)->state_current= 0;

Definition at line 87 of file private.h.

#define PDEBUG ( __function,
__format,
...   ) 

Definition at line 95 of file private.h.


Typedef Documentation

typedef char* drizzle_field_t

Definition at line 61 of file constants.h.

Definition at line 62 of file constants.h.

typedef uint8_t drizzle_charset_t

Definition at line 63 of file constants.h.

Definition at line 103 of file constants.h.

typedef void( drizzle_con_data_free_fn)(drizzle_con_st *con, void *data)

Definition at line 104 of file constants.h.

typedef void( drizzle_query_data_free_fn)(drizzle_query_st *query, void *data)

Definition at line 105 of file constants.h.

typedef drizzle_return_t( drizzle_event_watch_fn)(drizzle_con_st *con, short events, void *arg)

Definition at line 106 of file constants.h.


Enumeration Type Documentation

Return codes.

Enumerator:
DRIZZLE_RETURN_OK 
DRIZZLE_RETURN_IO_WAIT 
DRIZZLE_RETURN_PAUSE 
DRIZZLE_RETURN_ROW_BREAK 
DRIZZLE_RETURN_MEMORY 
DRIZZLE_RETURN_ERRNO 
DRIZZLE_RETURN_INTERNAL_ERROR 
DRIZZLE_RETURN_GETADDRINFO 
DRIZZLE_RETURN_NOT_READY 
DRIZZLE_RETURN_BAD_PACKET_NUMBER 
DRIZZLE_RETURN_BAD_HANDSHAKE_PACKET 
DRIZZLE_RETURN_BAD_PACKET 
DRIZZLE_RETURN_PROTOCOL_NOT_SUPPORTED 
DRIZZLE_RETURN_UNEXPECTED_DATA 
DRIZZLE_RETURN_NO_SCRAMBLE 
DRIZZLE_RETURN_AUTH_FAILED 
DRIZZLE_RETURN_NULL_SIZE 
DRIZZLE_RETURN_ERROR_CODE 
DRIZZLE_RETURN_TOO_MANY_COLUMNS 
DRIZZLE_RETURN_ROW_END 
DRIZZLE_RETURN_LOST_CONNECTION 
DRIZZLE_RETURN_COULD_NOT_CONNECT 
DRIZZLE_RETURN_NO_ACTIVE_CONNECTIONS 
DRIZZLE_RETURN_HANDSHAKE_FAILED 
DRIZZLE_RETURN_MAX 

Definition at line 68 of file constants.h.


Generated on Mon Sep 28 12:54:05 2009 by  doxygen 1.6.1