You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Initial implementation for bulk operations/array binding in prepared statements
This commit is contained in:
@@ -57,7 +57,9 @@ enum enum_stmt_attr_type
|
||||
STMT_ATTR_UPDATE_MAX_LENGTH,
|
||||
STMT_ATTR_CURSOR_TYPE,
|
||||
STMT_ATTR_PREFETCH_ROWS,
|
||||
STMT_ATTR_PREBIND_PARAMS=200
|
||||
STMT_ATTR_PREBIND_PARAMS=200,
|
||||
STMT_ATTR_ARRAY_SIZE,
|
||||
STMT_ATTR_BIND_TYPE
|
||||
};
|
||||
|
||||
enum enum_cursor_type
|
||||
@@ -68,6 +70,20 @@ enum enum_cursor_type
|
||||
CURSOR_TYPE_SCROLLABLE= 4
|
||||
};
|
||||
|
||||
enum enum_indicator_type
|
||||
{
|
||||
STMT_INDICATOR_NONE=0,
|
||||
STMT_INDICATOR_NULL=1,
|
||||
STMT_INDICATOR_DEFAULT=2,
|
||||
STMT_INDICATOR_NTS=4
|
||||
};
|
||||
|
||||
enum enum_bind_type
|
||||
{
|
||||
STMT_BIND_ROW=0,
|
||||
STMT_BIND_COLUMN
|
||||
};
|
||||
|
||||
typedef enum mysql_stmt_state
|
||||
{
|
||||
MYSQL_STMT_INITTED = 0,
|
||||
@@ -96,7 +112,12 @@ typedef struct st_mysql_bind
|
||||
unsigned char **row);
|
||||
/* output buffer length, must be set when fetching str/binary */
|
||||
unsigned long buffer_length;
|
||||
unsigned long offset; /* offset position for char/binary fetch */
|
||||
union {
|
||||
unsigned long offset; /* offset position for char/binary fetch */
|
||||
struct {
|
||||
uchar *indicator;
|
||||
};
|
||||
};
|
||||
unsigned long length_value; /* Used if length is 0 */
|
||||
unsigned int flags; /* special flags, e.g. for dummy bind */
|
||||
unsigned int pack_length; /* Internal length for packed data */
|
||||
@@ -206,6 +227,8 @@ struct st_mysql_stmt
|
||||
unsigned int execute_count;/* count how many times the stmt was executed */
|
||||
mysql_stmt_use_or_store_func default_rset_handler;
|
||||
struct st_mysqlnd_stmt_methods *m;
|
||||
unsigned int array_size;
|
||||
enum enum_bind_type bind_type;
|
||||
};
|
||||
|
||||
typedef void (*ps_field_fetch_func)(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row);
|
||||
|
Reference in New Issue
Block a user