XXII. DB++ Functions

Warning

This extension is EXPERIMENTAL. The behaviour of this extension, including the names of its functions, and anything else documented about this extension may change in a future release of PHP without notice. Be warned and use this extension at your own risk.

Introduction

db++, made by the german company Concept asa, is a relational database system with high performance and low memory and disk usage in mind. While providing SQL as an additional language interface it is not really a SQL database in the first place but provides its own AQL query language which is much more influenced by the relational algebra then SQL is.

Concept asa always had an interest in supporting open source languages, db++ has had Perl and Tcl call interfaces for years now and uses Tcl as its internal stored procedure language.

Requirements

This extension relies on external client libraries so you have to have a db++ client installed on the system you want to use this extension on.

Concept asa provides db++ Demo versions and documentation for Linux, some other UNIX versions. There is also a Windows version of db++, but this extension doesn't support it (yet).

Installation

In order to build this extension yourself you need the db++ client libraries and header files to be installed on your system (these are included in the db++ installation archives by default). You have to run configure with option --with-dbplus to build this extension.

configure looks for the client libraries and header files under the default paths /usr/dbplus, /usr/local/dbplus and /opt/dblus. If you have installed db++ in a different place you have add the installation path to the configure option like this: --with-dbplus=/your/installation/path.

Runtime Configuration

This extension does not define any configuration directives.

Resource Types

dbplus_relation

Most db++ functions operate on or return dbplus_relation resources. A dbplus_relation is a handle to a stored relation or a relation generated as the result of a query.

Predefined Constants

These constants are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

DBPLUS_ERR_NOERR (integer)

DBPLUS_ERR_DUPLICATE (integer)

DBPLUS_ERR_EOSCAN (integer)

DBPLUS_ERR_EMPTY (integer)

DBPLUS_ERR_CLOSE (integer)

DBPLUS_ERR_WLOCKED (integer)

DBPLUS_ERR_LOCKED (integer)

DBPLUS_ERR_NOLOCK (integer)

DBPLUS_ERR_READ (integer)

DBPLUS_ERR_WRITE (integer)

DBPLUS_ERR_CREATE (integer)

DBPLUS_ERR_LSEEK (integer)

DBPLUS_ERR_LENGTH (integer)

DBPLUS_ERR_OPEN (integer)

DBPLUS_ERR_WOPEN (integer)

DBPLUS_ERR_MAGIC (integer)

DBPLUS_ERR_VERSION (integer)

DBPLUS_ERR_PGSIZE (integer)

DBPLUS_ERR_CRC (integer)

DBPLUS_ERR_PIPE (integer)

DBPLUS_ERR_NIDX (integer)

DBPLUS_ERR_MALLOC (integer)

DBPLUS_ERR_NUSERS (integer)

DBPLUS_ERR_PREEXIT (integer)

DBPLUS_ERR_ONTRAP (integer)

DBPLUS_ERR_PREPROC (integer)

DBPLUS_ERR_DBPARSE (integer)

DBPLUS_ERR_DBRUNERR (integer)

DBPLUS_ERR_DBPREEXIT (integer)

DBPLUS_ERR_WAIT (integer)

DBPLUS_ERR_CORRUPT_TUPLE (integer)

DBPLUS_ERR_WARNING0 (integer)

DBPLUS_ERR_PANIC (integer)

DBPLUS_ERR_FIFO (integer)

DBPLUS_ERR_PERM (integer)

DBPLUS_ERR_TCL (integer)

DBPLUS_ERR_RESTRICTED (integer)

DBPLUS_ERR_USER (integer)

DBPLUS_ERR_UNKNOWN (integer)

Table of Contents
dbplus_add -- Add a tuple to a relation
dbplus_aql -- Perform AQL query
dbplus_chdir -- Get/Set database virtual current directory
dbplus_close -- Close a relation
dbplus_curr -- Get current tuple from relation
dbplus_errcode --  Get error string for given errorcode or last error
dbplus_errno -- Get error code for last operation
dbplus_find -- Set a constraint on a relation
dbplus_first -- Get first tuple from relation
dbplus_flush -- Flush all changes made on a relation
dbplus_freealllocks -- Free all locks held by this client
dbplus_freelock -- Release write lock on tuple
dbplus_freerlocks -- Free all tuple locks on given relation
dbplus_getlock -- Get a write lock on a tuple
dbplus_getunique -- Get a id number unique to a relation
dbplus_info -- ???
dbplus_last -- Get last tuple from relation
dbplus_lockrel -- Request write lock on relation
dbplus_next -- Get next tuple from relation
dbplus_open -- Open relation file
dbplus_prev -- Get previous tuple from relation
dbplus_rchperm -- Change relation permissions
dbplus_rcreate -- Creates a new DB++ relation
dbplus_rcrtexact -- Creates an exact but empty copy of a relation including indices
dbplus_rcrtlike -- Creates an empty copy of a relation with default indices
dbplus_resolve -- Resolve host information for relation
dbplus_restorepos -- ???
dbplus_rkeys -- Specify new primary key for a relation
dbplus_ropen -- Open relation file local
dbplus_rquery -- Perform local (raw) AQL query
dbplus_rrename -- Rename a relation
dbplus_rsecindex --  Create a new secondary index for a relation
dbplus_runlink -- Remove relation from filesystem
dbplus_rzap -- Remove all tuples from relation
dbplus_savepos -- ???
dbplus_setindex -- ???
dbplus_setindexbynumber -- ???
dbplus_sql -- Perform SQL query
dbplus_tcl -- Execute TCL code on server side
dbplus_tremove -- Remove tuple and return new current tuple
dbplus_undo -- ???
dbplus_undoprepare -- ???
dbplus_unlockrel -- Give up write lock on relation
dbplus_unselect -- Remove a constraint from relation
dbplus_update -- Update specified tuple in relation
dbplus_xlockrel -- Request exclusive lock on relation
dbplus_xunlockrel -- Free exclusive lock on relation