DB++

目录

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 an SQL database in the first place but provides its own AQL query language which is much more influenced by the relational algebra than 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.

Warning

此扩展是实验性 的。 此扩展的表象,包括其函数名称以及其他此扩展的相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本扩展风险自担 。

安装/配置

目录

需求

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).

安装

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.

运行时配置

此扩展没有在 php.ini 中定义配置指令。

资源类型

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.

预定义常量

目录

下列常量由此扩展定义,且仅在此扩展编译入 PHP 或在运行时动态载入时可用。

db++ error codes

PHP Constantdb++ constantmeaning
DBPLUS_ERR_NOERR (integer)ERR_NOERRNull error condition
DBPLUS_ERR_DUPLICATE (integer)ERR_DUPLICATETried to insert a duplicate tuple
DBPLUS_ERR_EOSCAN (integer)ERR_EOSCANEnd of scan from rget()
DBPLUS_ERR_EMPTY (integer)ERR_EMPTYRelation is empty (server)
DBPLUS_ERR_CLOSE (integer)ERR_CLOSEThe server can't close
DBPLUS_ERR_WLOCKED (integer)ERR_WLOCKEDThe record is write locked
DBPLUS_ERR_LOCKED (integer)ERR_LOCKEDRelation was already locked
DBPLUS_ERR_NOLOCK (integer)ERR_NOLOCKRelation cannot be locked
DBPLUS_ERR_READ (integer)ERR_READRead error on relation
DBPLUS_ERR_WRITE (integer)ERR_WRITEWrite error on relation
DBPLUS_ERR_CREATE (integer)ERR_CREATECreate() system call failed
DBPLUS_ERR_LSEEK (integer)ERR_LSEEKLseek() system call failed
DBPLUS_ERR_LENGTH (integer)ERR_LENGTHTuple exceeds maximum length
DBPLUS_ERR_OPEN (integer)ERR_OPENOpen() system call failed
DBPLUS_ERR_WOPEN (integer)ERR_WOPENRelation already opened for writing
DBPLUS_ERR_MAGIC (integer)ERR_MAGICFile is not a relation
DBPLUS_ERR_VERSION (integer)ERR_VERSIONFile is a very old relation
DBPLUS_ERR_PGSIZE (integer)ERR_PGSIZERelation uses a different page size
DBPLUS_ERR_CRC (integer)ERR_CRCInvalid crc in the superpage
DBPLUS_ERR_PIPE (integer)ERR_PIPEPiped relation requires lseek()
DBPLUS_ERR_NIDX (integer)ERR_NIDXToo many secondary indices
DBPLUS_ERR_MALLOC (integer)ERR_MALLOCMalloc() call failed
DBPLUS_ERR_NUSERS (integer)ERR_NUSERSError use of max users
DBPLUS_ERR_PREEXIT (integer)ERR_PREEXITCaused by invalid usage
DBPLUS_ERR_ONTRAP (integer)ERR_ONTRAPCaused by a signal
DBPLUS_ERR_PREPROC (integer)ERR_PREPROCError in the preprocessor
DBPLUS_ERR_DBPARSE (integer)ERR_DBPARSEError in the parser
DBPLUS_ERR_DBRUNERR (integer)ERR_DBRUNERRRun error in db
DBPLUS_ERR_DBPREEXIT (integer)ERR_DBPREEXITExit condition caused by prexit() * procedure
DBPLUS_ERR_WAIT (integer)ERR_WAITWait a little (Simple only)
DBPLUS_ERR_CORRUPT_TUPLE (integer)ERR_CORRUPT_TUPLEA client sent a corrupt tuple
DBPLUS_ERR_WARNING0 (integer)ERR_WARNING0The Simple routines encountered a non fatal error which was corrected
DBPLUS_ERR_PANIC (integer)ERR_PANICThe server should not really die but after a disaster send ERR_PANIC to all its clients
DBPLUS_ERR_FIFO (integer)ERR_FIFOCan't create a fifo
DBPLUS_ERR_PERM (integer)ERR_PERMPermission denied
DBPLUS_ERR_TCL (integer)ERR_TCLTCL_error
DBPLUS_ERR_RESTRICTED (integer)ERR_RESTRICTEDOnly two users
DBPLUS_ERR_USER (integer)ERR_USERAn error in the use of the library by an application programmer
DBPLUS_ERR_UNKNOWN (integer)ERR_UNKNOWN 

dbplus_add

Add a tuple to a relation

说明

int dbplus_add ( resource $relation , array $tuple )

Adds a tuple to a relation.

参数

relation

tuple
An array of attribute/value pairs to be inserted into the given relation.

After successful execution this array will contain the complete data of the newly created tuple, including all implicitly set domain fields like sequences.

返回值

The function will return DBPLUS_ERR_NOERR on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_errcode

dbplus_aql

Perform AQL query

说明

resource dbplus_aql ( string $query [, string $server [, string $dbpath ]] )

Executes an AQL query on the given server and dbpath.

参数

query
The AQL query to be executed. Further information on the AQL (Algebraic Query Language) is provided in the original db++ manual.

server

dbpath

返回值

Returns a relation handle on success. The result data may be fetched from this relation by calling dbplus_next and dbplus_curr. Other relation access functions will not work on a result relation.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_chdir

Get/Set database virtual current directory

说明

string dbplus_chdir ([ string $newdir ] )

Changes the virtual current directory where relation files will be looked for by dbplus_open.

参数

newdir
The new directory for relation files. You can omit this parameter to query the current working directory.

返回值

Returns the absolute path of the current directory.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_close

Close a relation

说明

mixed dbplus_close ( resource $relation )

Closes a relation previously opened by dbplus_open.

参数

relation
A relation opened by dbplus_open.

返回值

Returns TRUE on success or DBPLUS_ERR_UNKNOWN on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_curr

Get current tuple from relation

说明

int dbplus_curr ( resource $relation , array &$tuple )

Reads the data for the current tuple for the given relation.

参数

relation
A relation opened by dbplus_open.

tuple
The data will be passed back in this parameter, as an associative array.

返回值

The function will return zero (aka. DBPLUS_ERR_NOERR) on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_first
  • dbplus_prev
  • dbplus_next
  • dbplus_last
  • dbplus_errcode

dbplus_errcode

Get error string for given errorcode or last error

说明

string dbplus_errcode ([ int $errno ] )

Returns a clear error string for the given error code.

参数

errno
The error code. If not provided, the result code of the last db++ operation is assumed.

返回值

Returns the error message.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_errno

Get error code for last operation

说明

int dbplus_errno ( void )

Returns the error code returned by the last db++ operation.

返回值

Returns the error code, as an integer.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_errcode

dbplus_find

Set a constraint on a relation

说明

int dbplus_find ( resource $relation , array $constraints , mixed $tuple )

Places a constraint on the given relation.

Further calls to functions like dbplus_curr or dbplus_next will only return tuples matching the given constraints.

参数

relation
A relation opened by dbplus_open.

constraints
Constraints are triplets of strings containing of a domain name, a comparison operator and a comparison value. The constraints parameter array may consist of a collection of string arrays, each of which contains a domain, an operator and a value, or of a single string array containing a multiple of three elements.

The comparison operator may be one of the following strings: '==', '>', '>=', '<', '<=', '!=', '~' for a regular expression match and 'BAND' or 'BOR' for bitwise operations.

tuple

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_unselect

dbplus_first

Get first tuple from 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.

参数

relation
A relation opened by dbplus_open.

tuple

返回值

Returns DBPLUS_ERR_NOERR on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_curr
  • dbplus_prev
  • dbplus_next
  • dbplus_last
  • dbplus_errcode

dbplus_flush

Flush all changes made on a relation

说明

int dbplus_flush ( resource $relation )

Writes all changes applied to relation since the last flush to disk.

参数

relation
A relation opened by dbplus_open.

返回值

Returns DBPLUS_ERR_NOERR on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_errcode

dbplus_freealllocks

Free all locks held by this client

说明

int dbplus_freealllocks ( void )

Frees all tuple locks held by this client.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_getlock
  • dbplus_freelock
  • dbplus_freerlocks

dbplus_freelock

Release write lock on tuple

说明

int dbplus_freelock ( resource $relation , string $tuple )

Releases a write lock on the given tuple previously obtained by dbplus_getlock.

参数

relation
A relation opened by dbplus_open.

tuple

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_getlock
  • dbplus_freerlocks
  • dbplus_freealllocks

dbplus_freerlocks

Free all tuple locks on given relation

说明

int dbplus_freerlocks ( resource $relation )

Frees all tuple locks held on the given relation.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_getlock
  • dbplus_freelock
  • dbplus_freealllocks

dbplus_getlock

Get a write lock on a tuple

说明

int dbplus_getlock ( resource $relation , string $tuple )

Requests a write lock on the specified tuple.

参数

relation
A relation opened by dbplus_open.

tuple

返回值

Returns zero on success or a non-zero error code, especially DBPLUS_ERR_WLOCKED on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_freelock
  • dbplus_freerlocks
  • dbplus_freealllocks

dbplus_getunique

Get an id number unique to a relation

说明

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.

参数

relation
A relation opened by dbplus_open.

uniqueid

返回值

Returns DBPLUS_ERR_NOERR on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_info

Get information about a relation

说明

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

Warning

本函数还未编写文档,仅有参数列表。

参数

relation
A relation opened by dbplus_open.

key

result

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_last

Get last tuple from relation

说明

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.

参数

relation
A relation opened by dbplus_open.

tuple

返回值

Returns DBPLUS_ERR_NOERR on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_first
  • dbplus_curr
  • dbplus_prev
  • dbplus_next

dbplus_lockrel

Request write lock on relation

说明

int dbplus_lockrel ( resource $relation )

Requests a write lock on the given relation.

Other clients may still query the relation, but can't alter it while it is locked.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_next

Get next tuple from 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.

参数

relation
A relation opened by dbplus_open.

tuple

返回值

Returns DBPLUS_ERR_NOERR on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_first
  • dbplus_curr
  • dbplus_prev
  • dbplus_last

dbplus_open

Open relation file

说明

resource dbplus_open ( string $name )

Opens the given relation file.

参数

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 resource (cursor) is returned which must be used in any subsequent commands referencing the relation. Failure leads to a zero return value, the actual error code may be asked for by calling dbplus_errno.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_prev

Get previous tuple from relation

说明

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.

参数

relation
A relation opened by dbplus_open.

tuple

返回值

Returns DBPLUS_ERR_NOERR on success or a db++ error code on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_first
  • dbplus_curr
  • dbplus_next
  • dbplus_last

dbplus_rchperm

Change relation permissions

说明

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.

参数

relation
A relation opened by dbplus_open.

mask

user

group

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rcreate

Creates a new DB++ relation

说明

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.

参数

name

domlist
A combination of domains. May be passed as a single domain name string or as an array of domain names.

This parameter should contain the domain specification for the new relation within an array of domain description strings. A domain description string consists of a domain name unique to this relation, a slash and a type specification character. See the db++ documentation, especially the dbcreate(1) manpage, for a description of available type specifiers and their meanings.

Note:

This function will also accept a string with space delimited domain description strings, but it is recommended to use an array

overwrite

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rcrtexact

Creates an exact but empty copy of a relation including indices

说明

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.

参数

name

relation
The copied relation, opened by dbplus_open.

overwrite
An existing relation by the same name will only be overwritten if this parameter is set to TRUE and no other process is currently using the relation.

返回值

Returns resource on success or DBPLUS_ERR_UNKNOWN on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rcrtlike

Creates an empty copy of a relation with default indices

说明

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

dbplus_rcrtexact will create an empty copy of the given relation under a new name, but with default indices.

参数

name

relation
The copied relation, opened by dbplus_open.

overwrite
An existing relation by the same name will only be overwritten if this parameter is set to TRUE and no other process is currently using the relation.

返回值

Returns resource on success or DBPLUS_ERR_UNKNOWN on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_resolve

Resolve host information for relation

说明

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.

参数

relation_name
The relation name.

返回值

Returns an array containing these values under the keys sid, host and host_path or FALSE on error.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_tcl

dbplus_restorepos

Restore position

说明

int dbplus_restorepos ( resource $relation , array $tuple )

Warning

本函数还未编写文档,仅有参数列表。

参数

relation
A relation opened by dbplus_open.

tuple

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rkeys

Specify new primary key for a relation

说明

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.

参数

relation
A relation opened by dbplus_open.

domlist
A combination of domains. May be passed as a single domain name string or as an array of domain names.

返回值

Returns resource on success or DBPLUS_ERR_UNKNOWN on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_ropen

Open relation file local

说明

resource dbplus_ropen ( string $name )

dbplus_ropen will open the relation file locally for quick access without any client/server overhead. Access is read only and only dbplus_curr and dbplus_next may be applied to the returned relation.

参数

name

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rquery

Perform local (raw) AQL query

说明

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. dbplus_rquery is faster than dbplus_aql but will work on local data only.

参数

query

dbpath

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rrename

Rename a relation

说明

int dbplus_rrename ( resource $relation , string $name )

dbplus_rrename will change the name of relation to name.

参数

relation
A relation opened by dbplus_open.

name

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rsecindex

Create a new secondary index for a relation

说明

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

参数

relation
A relation opened by dbplus_open.

domlist
A combination of domains. May be passed as a single domain name string or as an array of domain names.

type

返回值

Returns resource on success or DBPLUS_ERR_UNKNOWN on failure.

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_runlink

Remove relation from filesystem

说明

int dbplus_runlink ( resource $relation )

dbplus_runlink will close and remove the relation.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_rzap

Remove all tuples from relation

说明

int dbplus_rzap ( resource $relation )

dbplus_rzap will remove all tuples from relation.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_savepos

Save position

说明

int dbplus_savepos ( resource $relation )

Warning

本函数还未编写文档,仅有参数列表。

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_setindex

Set index

说明

int dbplus_setindex ( resource $relation , string $idx_name )

Warning

本函数还未编写文档,仅有参数列表。

参数

relation
A relation opened by dbplus_open.

idx_name

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_setindexbynumber

Set index by number

说明

int dbplus_setindexbynumber ( resource $relation , int $idx_number )

Warning

本函数还未编写文档,仅有参数列表。

参数

relation
A relation opened by dbplus_open.

idx_number

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_sql

Perform SQL query

说明

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

Warning

本函数还未编写文档,仅有参数列表。

参数

query

server

dbpath

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_tcl

Execute TCL code on server side

说明

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.

dbplus_tcl needs to pass the client connection id the TCL script code should be executed by. dbplus_resolve will provide this connection id. The function will return whatever the TCL code returns or a TCL error message if the TCL code fails.

参数

sid

script

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_resolve

dbplus_tremove

Remove tuple and return new current tuple

说明

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.

参数

relation
A relation opened by dbplus_open.

tuple

current

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_undo

Undo

说明

int dbplus_undo ( resource $relation )

Warning

本函数还未编写文档,仅有参数列表。

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_undoprepare

Prepare undo

说明

int dbplus_undoprepare ( resource $relation )

Warning

本函数还未编写文档,仅有参数列表。

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_unlockrel

Give up write lock on relation

说明

int dbplus_unlockrel ( resource $relation )

Release a write lock previously obtained by dbplus_lockrel.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_unselect

Remove a constraint from relation

说明

int dbplus_unselect ( resource $relation )

Calling dbplus_unselect will remove a constraint previously set by dbplus_find on relation.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_update

Update specified tuple in 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.

参数

relation
A relation opened by dbplus_open.

old
The old tuple.

new
The new tuple.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

dbplus_xlockrel

Request exclusive lock on relation

说明

int dbplus_xlockrel ( resource $relation )

Request an exclusive lock on relation preventing even read access from other clients.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参见

  • dbplus_xunlockrel

dbplus_xunlockrel

Free exclusive lock on relation

说明

int dbplus_xunlockrel ( resource $relation )

Releases an exclusive lock previously obtained by dbplus_xlockrel.

参数

relation
A relation opened by dbplus_open.

返回值

注释

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

目录