From 047cba3421b388b22c142c0cc5b574947891bce5 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Tue, 21 Aug 2001 18:16:46 +0000 Subject: [PATCH] some additions, still some way to go ... git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@55678 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/dbplus.xml | 383 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 375 insertions(+), 8 deletions(-) diff --git a/functions/dbplus.xml b/functions/dbplus.xml index 52539e3276..6e37b0fd4b 100644 --- a/functions/dbplus.xml +++ b/functions/dbplus.xml @@ -1,5 +1,5 @@ - + DB++ functions @@ -42,7 +42,220 @@ this: . - +
+ db++ error codes + + + db++ error codes + + + + PHP Constant + db++ constant + meaning + + + + + DBPLUS_ERR_NOERR + ERR_NOERR + Null error condition + + + DBPLUS_ERR_DUPLICATE + ERR_DUPLICATE + Tried to insert a duplicate tuple + + + DBPLUS_ERR_EOSCAN + ERR_EOSCAN + End of scan from rget() + + + DBPLUS_ERR_EMPTY + ERR_EMPTY + Relation is empty (server) + + + DBPLUS_ERR_CLOSE + ERR_CLOSE + The server can't close + + + DBPLUS_ERR_WLOCKED + ERR_WLOCKED + The record is write locked + + + DBPLUS_ERR_LOCKED + ERR_LOCKED + Relation was already locked + + + DBPLUS_ERR_NOLOCK + ERR_NOLOCK + Relation cannot be locked + + + DBPLUS_ERR_READ + ERR_READ + Read error on relation + + + DBPLUS_ERR_WRITE + ERR_WRITE + Write error on relation + + + DBPLUS_ERR_CREATE + ERR_CREATE + Creat() system call failed + + + DBPLUS_ERR_LSEEK + ERR_LSEEK + Lseek() system call failed + + + DBPLUS_ERR_LENGTH + ERR_LENGTH + Tuple exceeds maximum length + + + DBPLUS_ERR_OPEN + ERR_OPEN + Open() system call failed + + + DBPLUS_ERR_WOPEN + ERR_WOPEN + Relation already opened for writing + + + DBPLUS_ERR_MAGIC + ERR_MAGIC + File is not a relation + + + DBPLUS_ERR_VERSION + ERR_VERSION + File is a very old relation + + + DBPLUS_ERR_PGSIZE + ERR_PGSIZE + Relation uses a different page size + + + DBPLUS_ERR_CRC + ERR_CRC + Invalid crc in the superpage + + + DBPLUS_ERR_PIPE + ERR_PIPE + Piped relation requires lseek() + + + DBPLUS_ERR_NIDX + ERR_NIDX + Too many secondary indices + + + DBPLUS_ERR_MALLOC + ERR_MALLOC + Malloc() call failed + + + DBPLUS_ERR_NUSERS + ERR_NUSERS + Error use of max users + + + DBPLUS_ERR_PREEXIT + ERR_PREEXIT + Caused by invalid usage + + + DBPLUS_ERR_ONTRAP + ERR_ONTRAP + Caused by a signal + + + DBPLUS_ERR_PREPROC + ERR_PREPROC + Error in the preprocessor + + + DBPLUS_ERR_DBPARSE + ERR_DBPARSE + Error in the parser + + + DBPLUS_ERR_DBRUNERR + ERR_DBRUNERR + Run error in db + + + DBPLUS_ERR_DBPREEXIT + ERR_DBPREEXIT + Exit condition caused by prexit() * procedure + + + DBPLUS_ERR_WAIT + ERR_WAIT + Wait a little (Simple only) + + + DBPLUS_ERR_CORRUPT_TUPLE + ERR_CORRUPT_TUPLE + A client sent a corrupt tuple + + + DBPLUS_ERR_WARNING0 + ERR_WARNING0 + The Simple routines encountered a non fatal error which was corrected + + + DBPLUS_ERR_PANIC + ERR_PANIC + The server should not really die but after a disaster send ERR_PANIC to all its clients + + + DBPLUS_ERR_FIFO + ERR_FIFO + Can't create a fifo + + + DBPLUS_ERR_PERM + ERR_PERM + Permission denied + + + DBPLUS_ERR_TCL + ERR_TCL + TCL_error + + + DBPLUS_ERR_RESTRICTED + ERR_RESTRICTED + Only two users + + + DBPLUS_ERR_USER + ERR_USER + An error in the use of the library by an application programmer + + + DBPLUS_ERR_UNKNOWN + ERR_UNKNOWN + + + + +
+
+
@@ -61,7 +274,20 @@ &warn.experimental.func; + This function will add a tuple to a relation. The + tuple data is an array of attribute/value + pairs to be inserted into the given + relation. After successfull execution the + tuple array will contain the complete data + of the newly created tuple, including all implicitly set domain + fields like sequences. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. + @@ -107,6 +333,14 @@ &warn.experimental.func; + dbplus_chdir will change the virtual current + directory where relation files will be looked for by + dbplus_open. + dbplus_chdir will return the absolute path + of the current directory. Calling + dbplus_chdir without giving any + newdir may be used to query the current + working directory. @@ -126,6 +360,8 @@ &warn.experimental.func; + Calling dbplus_close will close a relation + previously opened by dbplus_open. @@ -146,7 +382,23 @@ &warn.experimental.func; + dbplus_curr will read the data for the + current tuple for the given relation and + will pass it back as an associative array in + tuple. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. + + + See also dbplus_first, + dbplus_prev, + dbplus_next, + and dbplus_last. + @@ -169,6 +421,24 @@ + + + dbplus_errno + Get error code for last operation + + + Description + + + int dbplus_errno + + + + + + + + dbplus_first @@ -185,14 +455,30 @@ &warn.experimental.func; + dbplus_curr will read the data for the + first tuple for the given relation, make + it the current tuple and pass it back as an associative array in + tuple. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. + + + See also dbplus_current, + dbplus_prev, + dbplus_next, + and dbplus_last. + dbplus_flush - ??? + Flush all changes made on a relation Description @@ -204,7 +490,15 @@ &warn.experimental.func; + dbplus_flush will write all changes applied + to relation since the last flush to disk. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. + @@ -223,6 +517,8 @@ &warn.experimental.func; + dbplus_freeaalllocks will free all locks held + by this client. @@ -242,6 +538,8 @@ &warn.experimental.func; + dbplus_freerlocks will free all locks held + on the given relation. @@ -283,7 +581,23 @@ &warn.experimental.func; + dbplus_curr will read the data for the + last tuple for the given relation, make + it the current tuple and pass it back as an associative array in + tuple. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. + + + See also dbplus_first, + dbplus_current, + dbplus_prev, + and dbplus_next. + @@ -322,7 +636,24 @@ &warn.experimental.func; + dbplus_curr will read the data for the + next tuple for the given relation, will + make it the current tuple and + will pass it back as an associative array in + tuple. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. + + + See also dbplus_first, + dbplus_current, + dbplus_prev, + and dbplus_last. + @@ -370,7 +701,24 @@ &warn.experimental.func; + dbplus_curr will read the data for the + next tuple for the given relation, will + make it the current tuple and + will pass it back as an associative array in + tuple. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. + + + See also dbplus_first, + dbplus_current, + dbplus_next, + and dbplus_last. + @@ -753,7 +1101,9 @@ &warn.experimental.func; - Not implemented yet. + dbplus_freelock will release a write lock on + the given tuple previously obtained by + dbplus_getlock. @@ -774,8 +1124,17 @@ &warn.experimental.func; - Not implemented yet. + dbplus_getlock will request a write lock on + the speified tuple. It will return zero + on success or a non-zero error code, especially + DBPLUS_ERR_WLOCKED, on failure. + + See also + dbplus_freelock, + dbplus_freerlocks, + and dbplus_freealllocks. + @@ -790,14 +1149,22 @@ int dbplus_getunique int handle - string varname - int flush + int uniqueid &warn.experimental.func; - Not implemented yet. + dbplus_getunique will obtain a number + guaranteed to be unique for the given + relation and will pass it back in the + variable given as uniqueid. + + The function will return zero (aka. DBPLUS_ERR_NOERR) on success + or a db++ error code on failure. See + dbplus_errcode or the introduction to this + chapter for more information on db++ error codes. +