X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqconn.h;h=4f4b56c9d3dd34d543bfadead1e3459c211a5f58;hp=1e5c822dbf1866583a804ec320c0b1d56051a9b5;hb=359b3471d6ed843d8ecf9d5fb0b85f06af446800;hpb=9f5cecf26bd70a92ed013f31afec59e272623ac1 diff --git a/src/php_pqconn.h b/src/php_pqconn.h index 1e5c822..4f4b56c 100644 --- a/src/php_pqconn.h +++ b/src/php_pqconn.h @@ -19,15 +19,22 @@ #include #include "php_pq_callback.h" +#include "php_pq_params.h" typedef struct php_pqconn { PGconn *conn; int (*poller)(PGconn *); php_resource_factory_t factory; HashTable listeners; + HashTable converters; HashTable eventhandlers; php_pq_callback_t onevent; unsigned unbuffered:1; + unsigned default_fetch_type:2; + unsigned default_txn_isolation:2; + unsigned default_txn_readonly:1; + unsigned default_txn_deferrable:1; + unsigned default_auto_convert:16; } php_pqconn_t; typedef struct php_pqconn_object { @@ -47,12 +54,15 @@ php_resource_factory_ops_t *php_pqconn_get_resource_factory_ops(void); zend_class_entry *php_pqconn_class_entry; zend_object_value php_pqconn_create_object_ex(zend_class_entry *ce, php_pqconn_t *intern, php_pqconn_object_t **ptr TSRMLS_DC); void php_pqconn_notify_listeners(php_pqconn_object_t *obj TSRMLS_DC); -STATUS php_pqconn_prepare(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, HashTable *typest TSRMLS_DC); -STATUS php_pqconn_prepare_async(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, HashTable *typest TSRMLS_DC); +STATUS php_pqconn_prepare(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC); +STATUS php_pqconn_prepare_async(zval *object, php_pqconn_object_t *obj, const char *name, const char *query, php_pq_params_t *params TSRMLS_DC); STATUS php_pqconn_start_transaction(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC); STATUS php_pqconn_start_transaction_async(zval *zconn, php_pqconn_object_t *conn_obj, long isolation, zend_bool readonly, zend_bool deferrable TSRMLS_DC); +STATUS php_pqconn_declare(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC); +STATUS php_pqconn_declare_async(zval *object, php_pqconn_object_t *obj, const char *decl TSRMLS_DC); PHP_MINIT_FUNCTION(pqconn); +PHP_MSHUTDOWN_FUNCTION(pqconn); #endif