Now really split the method tables and have different

methods for the handle and the data object.
Add auxiliary functions to work with the new methods.
Add possibility to clone a connection object - shadow copy.
This commit is contained in:
Andrey Hristov 2011-10-31 14:33:56 +00:00
parent 6a9feb730f
commit ba1f65faa1
7 changed files with 509 additions and 432 deletions

View file

@ -26,6 +26,7 @@
#include "mysqlnd_debug.h"
static struct st_mysqlnd_conn_methods * mysqlnd_conn_methods;
static struct st_mysqlnd_conn_data_methods * mysqlnd_conn_data_methods;
static struct st_mysqlnd_stmt_methods * mysqlnd_stmt_methods;
/* {{{ _mysqlnd_plugin_get_plugin_connection_data */
@ -126,6 +127,22 @@ PHPAPI void mysqlnd_conn_set_methods(struct st_mysqlnd_conn_methods *methods)
/* }}} */
/* {{{ mysqlnd_conn_get_methods */
PHPAPI struct st_mysqlnd_conn_data_methods *
mysqlnd_conn_data_get_methods()
{
return mysqlnd_conn_data_methods;
}
/* }}} */
/* {{{ mysqlnd_conn_set_methods */
PHPAPI void mysqlnd_conn_data_set_methods(struct st_mysqlnd_conn_data_methods * methods)
{
mysqlnd_conn_data_methods = methods;
}
/* }}} */
/* {{{ mysqlnd_result_get_methods */
PHPAPI struct st_mysqlnd_res_methods *
mysqlnd_result_get_methods()