pdo_firebird: PDOStatement->closeCursor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I fell out of bed as I noticed that PDOStatement->closeCursor is not
implemented for pdo_firebird.

Again, I'm not a php guru, but patched my version with the attached diff.

HPO
--- php5-orig/ext/pdo_firebird/firebird_statement.c     2007-11-12 21:54:13.000000000 +0100
+++ php5/ext/pdo_firebird/firebird_statement.c  2007-11-12 21:51:03.000000000 +0100
@@ -621,6 +620,22 @@
 }
 /* }}} */

+static int firebird_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
+{
+       pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
+       int result = 1;
+
+       /* close the statement */
+       if (isc_dsql_free_statement(S->H->isc_status, &S->stmt, DSQL_close)) {
+               RECORD_ERROR(stmt);
+               result = 0;
+       }
+
+       return result;
+}
+/* }}} */
+
+
 struct pdo_stmt_methods firebird_stmt_methods = { /* {{{ */
        firebird_stmt_dtor,
        firebird_stmt_execute,
@@ -629,7 +644,10 @@
        firebird_stmt_get_col,
        firebird_stmt_param_hook,
        firebird_stmt_set_attribute,
-       firebird_stmt_get_attribute
+       firebird_stmt_get_attribute,
+       NULL,
+       NULL,
+       firebird_stmt_cursor_closer
 };
 /* }}} */

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux