PHP DB++ Functions

EditRocket provides the following information on DB++ functions in the PHP source code builder.

int dbplus_add ( resource $relation , array $tuple ) - Adds a tuple to a relation.

resource dbplus_aql ( string $query [, string $server [, string $dbpath ]] ) - Executes an AQL query on the given server and dbpath.

string dbplus_chdir ([ string $newdir ] ) -

mixed dbplus_close ( resource $relation ) -

int dbplus_curr ( resource $relation , array &$tuple ) - Reads the data for the current tuple for the given relation.

string dbplus_errcode ([ int $errno ] ) - Returns a clear error string for the given error code.

int dbplus_errno ( void ) - Returns the error code returned by the last db++ operation.

int dbplus_find ( resource $relation , array $constraints , mixed $tuple ) - Places a constraint on the given relation.

int dbplus_first ( resource $relation , array &$tuple ) - Reads the data for the first tuple for the given relation, makes it the current tuple and pass it back as an associative array in tuple.

int dbplus_flush ( resource $relation ) - Writes all changes applied to relation since the last flush to disk.

int dbplus_freealllocks ( void ) - Frees all tuple locks held by this client.

int dbplus_freelock ( resource $relation , string $tuple ) -

int dbplus_freerlocks ( resource $relation ) - Frees all tuple locks held on the given relation.

int dbplus_getlock ( resource $relation , string $tuple ) - Requests a write lock on the specified tuple.

int dbplus_getunique ( resource $relation , int $uniqueid ) - Obtains a number guaranteed to be unique for the given relation and will pass it back in the variable given as uniqueid.

int dbplus_info ( resource $relation , string $key , array &$result ) -

int dbplus_last ( resource $relation , array &$tuple ) - Reads the data for the last tuple for the given relation, makes it the current tuple and pass it back as an associative array in tuple.

int dbplus_lockrel ( resource $relation ) - Requests a write lock on the given relation.

int dbplus_next ( resource $relation , array &$tuple ) - Reads the data for the next tuple for the given relation, makes it the current tuple and will pass it back as an associative array in tuple.

resource dbplus_open ( string $name ) - Opens the given relation file.

int dbplus_prev ( resource $relation , array &$tuple ) - Reads the data for the previous tuple for the given relation, makes it the current tuple and will pass it back as an associative array in tuple.

int dbplus_rchperm ( resource $relation , int $mask , string $user , string $group ) - Changes access permissions as specified by mask, user and group. The values for these are operating system specific.

resource dbplus_rcreate ( string $name , mixed $domlist [, bool $overwrite ] ) - Creates a new relation. Any existing relation sharing the same name will be overwritten if the relation is currently not in use and overwrite is set to TRUE.

mixed dbplus_rcrtexact ( string $name , resource $relation [, bool $overwrite ] ) - dbplus_rcrtexact() will create an exact but empty copy of the given relation under a new name.

mixed dbplus_rcrtlike ( string $name , resource $relation [, int $overwrite ] ) -

array dbplus_resolve ( string $relation_name ) - dbplus_resolve() will try to resolve the given relation_name and find out internal server id, real hostname and the database path on this host.

int dbplus_restorepos ( resource $relation , array $tuple ) -

mixed dbplus_rkeys ( resource $relation , mixed $domlist ) - dbplus_rkeys() will replace the current primary key for relation with the combination of domains specified by domlist.

resource dbplus_ropen ( string $name ) - dbplus_ropen() will open the relation file locally for quick access without any client/server overhead.

resource dbplus_rquery ( string $query [, string $dbpath ] ) - dbplus_rquery() performs a local (raw) AQL query using an AQL interpreter embedded into the db++ client library.

int dbplus_rrename ( resource $relation , string $name ) - dbplus_rrename() will change the name of relation to name.

mixed dbplus_rsecindex ( resource $relation , mixed $domlist , int $type ) - dbplus_rsecindex() will create a new secondary index for relation with consists of the domains specified by domlist and is of type type

int dbplus_runlink ( resource $relation ) - dbplus_unlink() will close and remove the relation.

int dbplus_rzap ( resource $relation ) - dbplus_rzap() will remove all tuples from relation.

int dbplus_savepos ( resource $relation ) -

int dbplus_setindex ( resource $relation , string $idx_name ) -

int dbplus_setindexbynumber ( resource $relation , int $idx_number ) -

resource dbplus_sql ( string $query [, string $server [, string $dbpath ]] ) -

string dbplus_tcl ( int $sid , string $script ) - A db++ server will prepare a TCL interpreter for each client connection. This interpreter will enable the server to execute TCL code provided by the client as a sort of stored procedures to improve the performance of database operations by avoiding client/server data transfers and context switches.

int dbplus_tremove ( resource $relation , array $tuple [, array &$current ] ) - dbplus_tremove() removes tuple from relation if it perfectly matches a tuple within the relation. current, if given, will contain the data of the new current tuple after calling dbplus_tremove().

int dbplus_undo ( resource $relation ) -

int dbplus_undoprepare ( resource $relation ) -

int dbplus_unlockrel ( resource $relation ) -

int dbplus_unselect ( resource $relation ) -

int dbplus_update ( resource $relation , array $old , array $new ) - dbplus_update() replaces the old tuple with the data from the new one, only if the old completely matches a tuple within relation.

int dbplus_xlockrel ( resource $relation ) - Request an exclusive lock on relation preventing even read access from other clients.

int dbplus_xunlockrel ( resource $relation ) -