CVS update: php3/functions
| From: | thies | Date: | Mon, 19 Apr 1999 13:59:17 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-5138@lists.php.net to get a copy of this message | ||
Date: Monday April 19, 1999 @ 9:59
Author: thies
Update of /repository/php3/functions
In directory asf:/u/temp/cvs-serv13365/functions
Modified Files:
oci8.c
Log Message:
stubs for OCITransStart
Index: php3/functions/oci8.c
diff -c php3/functions/oci8.c:1.79 php3/functions/oci8.c:1.80
*** php3/functions/oci8.c:1.79 Mon Apr 19 09:43:14 1999
--- php3/functions/oci8.c Mon Apr 19 09:59:16 1999
***************
*** 33,39 ****
#define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */
! /* $Id: oci8.c,v 1.79 1999/04/19 13:43:14 thies Exp $ */
/* TODO list:
*
--- 33,39 ----
#define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */
! /* $Id: oci8.c,v 1.80 1999/04/19 13:59:16 thies Exp $ */
/* TODO list:
*
***************
*** 219,224 ****
--- 219,225 ----
void php3_oci8_loaddesc(INTERNAL_FUNCTION_PARAMETERS);
void php3_oci8_commit(INTERNAL_FUNCTION_PARAMETERS);
void php3_oci8_rollback(INTERNAL_FUNCTION_PARAMETERS);
+ void php3_oci8_transstart(INTERNAL_FUNCTION_PARAMETERS);
void php3_oci8_newdescriptor(INTERNAL_FUNCTION_PARAMETERS);
void php3_oci8_numcols(INTERNAL_FUNCTION_PARAMETERS);
void php3_oci8_parse(INTERNAL_FUNCTION_PARAMETERS);
***************
*** 268,273 ****
--- 269,275 ----
{"ociloaddesc", php3_oci8_loaddesc, NULL},
{"ocicommit", php3_oci8_commit, NULL},
{"ocirollback", php3_oci8_rollback, NULL},
+ {"ocitransstart", php3_oci8_transstart, NULL},
{"ocinewdescriptor", php3_oci8_newdescriptor, NULL},
{NULL, NULL, NULL}
};
***************
*** 2471,2476 ****
--- 2473,2524 ----
}
add_method(return_value, "free", php3_oci8_freedesc);
+ }
+
+ /* }}} */
+ /* {{{ proto string OCITransStart(int conn [, int timeout] [, int flags] )
+ rollback the current context
+ */
+
+ void php3_oci8_transstart(INTERNAL_FUNCTION_PARAMETERS)
+ {
+ pval *conn;
+ oci8_connection *connection;
+ sword ociresult;
+ OCI8_TLS_VARS;
+
+ if (getParameters(ht, 1, &conn) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_long(conn);
+
+ connection = oci8_get_conn(conn->value.lval, "OCITransStart", list);
+ if (connection == NULL) {
+ RETURN_FALSE;
+ }
+
+ /*
+ Specifies whether a new transaction is being started or an existing transaction is being resumed.
Also specifies serializiability or read-only status. More than a single value can be specified.
+ By default, a read/write transaction is started. The flag values are:
+
+ OCI_TRANS_NEW - starts a new transaction branch. By default starts a tightly coupled and
migratable branch.
+ OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch
+ OCI_TRANS_LOOSE - specifies a loosely coupled branch
+ OCI_TRANS_RESUME - resumes an existing transaction branch.
+ OCI_TRANS_READONLY - start a read-only transaction
+ OCI_TRANS_SERIALIZABLE - start a serializable transaction
+ */
+
+ ociresult = OCITransStart(connection->pServiceContext,connection->pError, (uword)60,(ub4)
OCI_TRANS_NEW);
+
+ oci8_debug("OCITransStart=%d",ociresult);
+
+ if (ociresult) {
+ oci8_error(connection->pError, "OCITransStart", ociresult);
+ RETURN_FALSE;
+ }
+
+ RETURN_TRUE;
}
/* }}} */
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net