X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqtxn.c;fp=src%2Fphp_pqtxn.c;h=fcf7a4bad5f6ee2f46b34687b20f366dd0a4024d;hp=41b49508bf0581a940975e348e54fd6d599dd397;hb=d613997b3072b8093bca3fe9d8aca115e2a579aa;hpb=2805a4d1f8dc3e718ba7822040208e9c608358e0 diff --git a/src/php_pqtxn.c b/src/php_pqtxn.c index 41b4950..fcf7a4b 100644 --- a/src/php_pqtxn.c +++ b/src/php_pqtxn.c @@ -229,6 +229,20 @@ static PHP_METHOD(pqtxn, __construct) { if (!conn_obj->intern) { throw_exce(EX_UNINITIALIZED TSRMLS_CC, "pq\\Connection not initialized"); } else { + + switch (ZEND_NUM_ARGS()) { + case 1: + case 2: + isolation = conn_obj->intern->default_txn_isolation; + /* no break */ + case 3: + readonly = conn_obj->intern->default_txn_readonly; + /* no break */ + case 4: + deferrable = conn_obj->intern->default_txn_deferrable; + break; + } + if (async) { rv = php_pqconn_start_transaction_async(zconn, conn_obj, isolation, readonly, deferrable TSRMLS_CC); } else {