summaryrefslogtreecommitdiff
path: root/ext/pdo_oci/php_pdo_oci_int.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-05-20 00:06:30 +0000
committerWez Furlong <wez@php.net>2004-05-20 00:06:30 +0000
commit04c35e3d91ce69100c33d2a4b2768facd01a0d01 (patch)
treeddaa65684ef2b37c2a86de8686029b5194e6a5bc /ext/pdo_oci/php_pdo_oci_int.h
parente7c72f8455ed26087bbf974723179fbf77696280 (diff)
downloadphp-git-04c35e3d91ce69100c33d2a4b2768facd01a0d01.tar.gz
re-jig error handling, and make it co-operate with the PDO error handling system.
Implement $dbh->exec() for OCI.
Diffstat (limited to 'ext/pdo_oci/php_pdo_oci_int.h')
-rwxr-xr-xext/pdo_oci/php_pdo_oci_int.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h
index 4933f9bbb3..d20baba47c 100755
--- a/ext/pdo_oci/php_pdo_oci_int.h
+++ b/ext/pdo_oci/php_pdo_oci_int.h
@@ -20,6 +20,13 @@
#include <oci.h>
+typedef struct {
+ const char *file;
+ int line;
+ sb4 errcode;
+ char *errmsg;
+} pdo_oci_error_info;
+
/* stuff we use in an OCI database handle */
typedef struct {
OCIServer *server;
@@ -33,6 +40,8 @@ typedef struct {
unsigned attached:1;
unsigned _reserved:31;
+
+ pdo_oci_error_info einfo;
} pdo_oci_db_handle;
typedef struct {
@@ -54,6 +63,7 @@ typedef struct {
ub2 stmt_type;
pdo_oci_column *cols;
+ pdo_oci_error_info einfo;
} pdo_oci_stmt;
typedef struct {
@@ -71,10 +81,9 @@ extern const ub4 PDO_OCI_INIT_MODE;
extern pdo_driver_t pdo_oci_driver;
extern OCIEnv *pdo_oci_Env;
-ub4 _oci_error(OCIError *err, char *what, sword status, const char *file, int line TSRMLS_DC);
-#define oci_error(e, w, s) _oci_error(e, w, s, __FILE__, __LINE__ TSRMLS_CC)
-
-ub4 oci_handle_error(pdo_dbh_t *dbh, pdo_oci_db_handle *H, ub4 errcode);
+ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, sword status, const char *file, int line TSRMLS_DC);
+#define oci_drv_error(w) _oci_error(H->err, dbh, NULL, w, H->last_err, __FILE__, __LINE__ TSRMLS_CC)
+#define oci_stmt_error(w) _oci_error(S->err, stmt->dbh, stmt, w, S->last_err, __FILE__, __LINE__ TSRMLS_CC)
extern struct pdo_stmt_methods oci_stmt_methods;