-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Support for Fetch Modes #4
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove shutdown callback ?
@@ -167,9 +157,9 @@ zend_module_entry SeasClick_module_entry = | |||
SEASCLICK_RES_NAME, | |||
SeasClick_functions, | |||
PHP_MINIT(SeasClick), | |||
PHP_MSHUTDOWN(SeasClick), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove shutdown callback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't do anything, so recommended approach is to not invlude PHP_MSHUT / PHP_MINIT unless they do something
@@ -98,6 +99,9 @@ const zend_function_entry SeasClick_methods[] = | |||
PHP_FE_END | |||
}; | |||
|
|||
#define REGISTER_SC_CLASS_CONST_LONG(const_name, value) \ | |||
zend_declare_class_constant_long(SeasClick_ce, const_name, sizeof(const_name)-1, (zend_long)value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do some compatibility tests, such as zend_long type does not support PHP 5 version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
SeasClick.cpp
Outdated
convertToZval(col2, block[1], row, "", 0, fetch_mode|SC_FETCH_ONE); | ||
|
||
if (Z_TYPE_P(col1) == IS_LONG) { | ||
zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(col1), col2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compatibility
#define zend_hash_index_update(ht, h, pData, nDataSize, pDest) _zend_hash_index_update_or_next_insert(ht, h, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC)
This is the definition of PHP 5 version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Upgraded clickhouse lib to v1.1.0 Added ability control connection, recv, timeouts & retry settings
@769344359 @Neeke Any chance to get it merged? |
it will have been merged when i finsh unit tests! |
@guba-odudkin could you please help me to fix the conflicts ? it change a lot of file, i can not merge it . |
Couple of feature enhancements to simplify data retrieval
Also added SeasClickException class so that exceptions thrown are specific to extension as opposed to using generic Exception class.