Index: phpdoc/en/functions/dbplus.xml
diff -u /dev/null phpdoc/en/functions/dbplus.xml:1.8
--- /dev/null Tue Aug 21 19:48:02 2001
+++ phpdoc/en/functions/dbplus.xml Tue Aug 21 19:48:02 2001
@@ -0,0 +1,1402 @@
+
+
+
+ DB++ functions
+
+
+
+ &warn.experimental;
+
+
+ Experimental support for db++ database
+
+ This paper describes the the db++ extension which enables PHP to
+ access db++ relation files through all of the search and update
+ methods available in the client/server "C" library interface of
+ db++ and to read and process the output of a db++ query.
+
+
+
+
+ Requirenments
+
+ ??? Download where
+
+
+
+
+ Installation
+
+ Creation and installation of this extension requires the db++
+ client libraries and header files to be installed on your system
+ as described above. You have to run configure
+ with option to build this
+ extension.
+
+
+ configure looks for the client libraries and
+ header files under the default
+ path/usr/dbplus/. If you have installed
+ db++ in a different place you have add the installation path to
+ the configure option like 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_WARNING0The 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_USERERR_USER
+ An error in the use of the library by an application
+ programmer
+
+
+ DBPLUS_ERR_UNKNOWN
+ ERR_UNKNOWN
+
+
+
+
+
+
+
+
+
+
+
+ dbplus_add
+ Add a tuple to a relation
+
+
+ Description
+
+
+ int dbplus_add
+ int relation
+ array tuple
+
+
+ &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.
+
+
+
+
+
+
+ dbplus_aql
+ Perform AQL query
+
+
+ Description
+
+
+ int dbplus_aql
+ string query
+ string
+ server
+
+ string
+ dbpath
+
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_chdir
+ Get/Set database virtual current directory
+
+
+ Description
+
+
+ string dbplus_chdir
+ string
+ newdir
+
+
+
+ &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.
+
+
+
+
+
+
+ dbplus_close
+ Close a relation
+
+
+ Description
+
+
+ int dbplus_close
+ int relation
+
+
+ &warn.experimental.func;
+
+ Calling dbplus_close will close a relation
+ previously opened by dbplus_open.
+
+
+
+
+
+
+ dbplus_curr
+ Get current tuple from relation
+
+
+ Description
+
+
+ int dbplus_curr
+ int relation
+ array tuple
+
+
+ &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.
+
+
+
+
+
+
+ dbplus_errcode
+
+ Get error string for given errorcode or last error
+
+
+
+ Description
+
+
+ string dbplus_errcode
+ int err
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_errno
+ Get error code for last operation
+
+
+ Description
+
+
+ int dbplus_errno
+
+
+
+
+
+
+
+
+
+
+ dbplus_first
+ Get first tuple from relation
+
+
+ Description
+
+
+ int dbplus_first
+ int relation
+ array tuple
+
+
+ &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
+
+
+ int dbplus_flush
+ int relation
+
+
+ &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.
+
+
+
+
+
+
+ dbplus_freealllocks
+ Free all locks held by this client
+
+
+ Description
+
+
+ int dbplus_freealllocks
+
+
+
+ &warn.experimental.func;
+
+ dbplus_freeaalllocks will free all locks
+ held by this client.
+
+
+
+
+
+
+ dbplus_freerlocks
+ Free all locks on given relation
+
+
+ Description
+
+
+ int dbplus_freerlocks
+ int relation
+
+
+ &warn.experimental.func;
+
+ dbplus_freerlocks will free all locks held
+ on the given relation.
+
+
+
+
+
+
+ dbplus_info
+ ???
+
+
+ Description
+
+
+ int dbplus_info
+ int relation
+ string key
+ array
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_last
+ Get last tuple from relation
+
+
+ Description
+
+
+ int dbplus_last
+ int relation
+ array tuple
+
+
+ &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.
+
+
+
+
+
+
+ dbplus_lockrel
+ Request read-lock on relation
+
+
+ Description
+
+
+ int dbplus_lockrel
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_next
+ Get next tuple from relation
+
+
+ Description
+
+
+ int dbplus_next
+ int relation
+ array
+
+
+ &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.
+
+
+
+
+
+
+ dbplus_open
+ Open relation file
+
+
+ Description
+
+
+ int dbplus_open
+ string name
+
+
+ &warn.experimental.func;
+
+ The relation file name will be opened.
+ name can be either a file name or a
+ relative or absolute path name. This will be mapped in any case
+ to an absolute relation file path on a specific host machine and
+ server.
+
+
+ On success a relation file handle (cursor) is returned which must
+ be used in any subsequent commanads referencing the relation.
+
+
+
+
+
+
+ dbplus_prev
+ Get previous tuple from relation
+
+
+ Description
+
+
+ int dbplus_prev
+ int relation
+ array tuple
+
+
+ &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.
+
+
+
+
+
+
+ dbplus_restorepos???
+
+
+ Description
+
+
+ int dbplus_restorepos
+ int relation
+ array tuple
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_ropen
+ Open relation file ... ???
+
+
+ Description
+
+
+ int dbplus_ropen
+ string name
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_runlink
+ Remove relation from filesystem
+
+
+ Description
+
+
+ int dbplus_runlink
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_rzap
+ Remove all tuples from relation
+
+
+ Description
+
+
+ int dbplus_rzap
+ int relation
+ int truncate
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_savepos
+ ???
+
+
+ Description
+
+
+ int dbplus_savepos
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_setindex
+ ???
+
+
+ Description
+
+
+ int dbplus_setindex
+ int relation
+ string idx_name
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_setindexbynumber
+ ???
+
+
+ Description
+
+
+ int dbplus_setindexbynumber
+ int relation
+ int idx_number
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_sql
+ Perform SQL query
+
+
+ Description
+
+
+ int dbplus_sql
+ string query
+ string server
+ string dbpath
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_tremove
+ Remove tuple and return new current tuple
+
+
+ Description
+
+
+ int dbplus_tremove
+ int relation
+ array old
+ array
+ current
+
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_undo
+ ???
+
+
+ Description
+
+
+ int dbplus_undo
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_undoprepare
+ ???
+
+
+ Description
+
+
+ int dbplus_undoprepare
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_unlockrel
+ Give up read-lock on relation
+
+
+ Description
+
+
+ int dbplus_unlockrel
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_unselect
+ ???
+
+
+ Description
+
+
+ int dbplus_unselect
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_update
+ Update specified tuple in relation
+
+
+ Description
+
+
+ int dbplus_update
+ int relation
+ array old
+ array new
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_xlockrel
+ Request exclusive write lock on relation
+
+
+ Description
+
+
+ int dbplus_xlockrel
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_xunlockrel
+ Free exclusive write lock on relation
+
+
+ Description
+
+
+ int dbplus_xunlockrel
+ int relation
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+
+
+
+
+ dbplus_change
+
+
+
+ Description
+
+
+ int dbplus_change
+ int handle
+ string domain
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_find
+
+
+
+ Description
+
+
+ int dbplus_find
+ int handle
+ string constr
+ string tname
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_freelock
+
+
+
+ Description
+
+
+ int dbplus_freelock
+ int handle
+ string tname
+
+
+ &warn.experimental.func;
+
+ dbplus_freelock will release a write lock on
+ the given tuple previously obtained by
+ dbplus_getlock.
+
+
+
+
+
+
+ dbplus_getlock
+
+
+
+ Description
+
+
+ int dbplus_getlock
+ int handle
+ string tname
+
+
+ &warn.experimental.func;
+
+ 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.
+
+
+
+
+
+
+ dbplus_getunique
+
+
+
+ Description
+
+
+ int dbplus_getunique
+ int handle
+ int uniqueid
+
+
+ &warn.experimental.func;
+
+ 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.
+
+
+
+
+
+
+ dbplus_rchperm
+
+
+
+ Description
+
+
+ int dbplus_rchperm
+ int handle
+ int mask
+ string user
+ string group
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_rcreate
+
+
+
+ Description
+
+
+ int dbplus_rcreate
+ string name
+ string domlist
+ int flag
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_rcrtexact
+
+
+
+ Description
+
+
+ int dbplus_rcrtexact
+ string name
+ int handle
+ int flag
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_rcrtlike
+
+
+
+ Description
+
+
+ int dbplus_rcrtlike
+ string name
+ int handle
+ int flag
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_resolve
+
+
+
+ Description
+
+
+ int dbplus_resolve
+ string name
+ string vname
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_rkeys
+
+
+
+ Description
+
+
+ int dbplus_rkeys
+ int handle
+ string domlist
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_rquery
+
+
+
+ Description
+
+
+ int dbplus_rquery
+
+
+
+ &warn.experimental.func;
+
+
+
+
+
+
+
+ dbplus_rrename
+
+
+
+ Description
+
+
+ int dbplus_rrename
+ int handle
+ string name
+ int flag
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_rsecindex
+
+
+
+ Description
+
+
+ int dbplus_rsecindex
+ int handle
+ string domlist
+ int compact
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+ dbplus_tcl
+
+
+
+ Description
+
+
+ int dbplus_tcl
+ int sid
+ string script
+
+
+ &warn.experimental.func;
+
+ Not implemented yet.
+
+
+
+
+
+
+