summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_structs.h
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2015-10-19 18:20:28 +0200
committerAndrey Hristov <andrey@php.net>2015-11-12 16:19:16 +0100
commit10d4fb8a9428d2b84ac6093bb3987ef667916fd4 (patch)
tree47689094460b0b0cc008d839e67d43a32ef187d6 /ext/mysqlnd/mysqlnd_structs.h
parente24dc94f325476e8921d8447970a27b9305d93c6 (diff)
downloadphp-git-10d4fb8a9428d2b84ac6093bb3987ef667916fd4.tar.gz
MDNR:
- Refactor the command factory. Let the factory be exchangeable.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_structs.h')
-rw-r--r--ext/mysqlnd/mysqlnd_structs.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h
index 9489f1d2c7..959c9a2cb8 100644
--- a/ext/mysqlnd/mysqlnd_structs.h
+++ b/ext/mysqlnd/mysqlnd_structs.h
@@ -900,6 +900,15 @@ struct st_mysqlnd_protocol_payload_decoder_factory
};
+struct st_mysqlnd_protocol_command
+{
+ enum_func_status (*run)(void *cmd);
+ void (*free_command)(void * cmd);
+};
+
+typedef struct st_mysqlnd_protocol_command * (*func_mysqlnd__command_factory)(enum php_mysqlnd_server_command command, ...);
+
+
struct st_mysqlnd_connection_data
{
/* Operation related */
@@ -978,6 +987,7 @@ struct st_mysqlnd_connection_data
zend_bool in_async_err_cb;
struct st_mysqlnd_object_factory_methods object_factory;
+ func_mysqlnd__command_factory command_factory;
struct st_mysqlnd_conn_data_methods * m;
@@ -1240,11 +1250,4 @@ struct st_mysqlnd_authentication_plugin
} methods;
};
-
-struct st_mysqlnd_protocol_command
-{
- enum_func_status (*run)(void *cmd);
- void (*free_command)(void * cmd);
-};
-
#endif /* MYSQLND_STRUCTS_H */