Date: 08/31/00
- Next message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions dbm.xml"
- Previous message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions datetime.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
perugini Thu Aug 31 09:27:37 2000 EDT
Modified files:
/phpdoc/it/functions dba.xml
Log:
Sync with en tree.
Index: phpdoc/it/functions/dba.xml
diff -u phpdoc/it/functions/dba.xml:1.2 phpdoc/it/functions/dba.xml:1.3
--- phpdoc/it/functions/dba.xml:1.2 Sat Jun 24 00:38:44 2000
+++ phpdoc/it/functions/dba.xml Thu Aug 31 09:27:36 2000
@@ -4,117 +4,136 @@
<partintro>
<para>
- These functions build the foundation for accessing Berkeley DB style
- databases.</para>
-
+ These functions build the foundation for accessing Berkeley DB
+ style databases.
+ </para>
<para>
This is a general abstraction layer for several file-based databases. As
such, functionality is limited to a subset of features modern databases
- such as <ulink url="">Sleepycat Software's DB2</ulink>
+ such as <ulink url="&url.sleepycat;">Sleepycat Software's DB2</ulink>
support. (This is not to be confused with IBM's DB2 software, which is
- supported through the <link linkend="ref.odbc">ODBC functions</link>.)</para>
-
+ supported through the <link linkend="ref.odbc">ODBC functions</link>.)
+ </para>
<para>
The behaviour of various aspects depend on the implementation of the
underlying database. Functions such as <function>dba_optimize</function>
and <function>dba_sync</function> will do what they promise for one
- database and will do nothing for others.</para>
-
+ database and will do nothing for others.
+ </para>
<para>
- The following handlers are supported:
-
+ To add support for any of the following handlers, add the specified --with
+ configure switch to your PHP configure line:
<itemizedlist>
- <listitem><simpara>
- dbm is the oldest (original) type of Berkeley DB style databases. You
- should avoid it, if possible. We do not support the compatibility
- functions built into DB2 and gdbm, because they are only compatible on
- the source code level, but cannot handle the original dbm format.</simpara></listitem>
-
- <listitem><simpara>
- ndbm is a newer type and more flexible than dbm. It still has most of the
- arbitrary limits of dbm (therefore it is deprecated).</simpara></listitem>
-
- <listitem><simpara>
- gdbm is the <ulink url="">GNU database manager</ulink>.</simpara></listitem>
-
- <listitem><simpara>
- db2 is <ulink url="">Sleepycat Software's DB2</ulink>. It
- is described as "a programmatic toolkit that provides high-performance
- built-in database support for both standalone and client/server
- applications."</simpara></listitem>
-
- <listitem><simpara>
- cdb is "a fast, reliable, lightweight package for creating and reading
- constant databases." It is from the author of qmail and can be found
- <ulink url="">here</ulink>. Since it is constant, we support
- only reading operations.</simpara></listitem>
-
- </itemizedlist></para>
-
+ <listitem>
+ <simpara>
+ Dbm is the oldest (original) type of Berkeley DB style
+ databases. You should avoid it, if possible. We do not support
+ the compatibility functions built into DB2 and gdbm, because
+ they are only compatible on the source code level, but cannot
+ handle the original dbm format. (--with-dbm)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ndbm is a newer type and more flexible than dbm. It still has
+ most of the arbitrary limits of dbm (therefore it is
+ deprecated). (--with-ndbm)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Gdbm is the <ulink url="&url.gdbm;">GNU database
+ manager</ulink>. (--with-gdbm)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ DB2 is <ulink url="&url.sleepycat;">Sleepycat Software's
+ DB2</ulink>. It is described as "a programmatic toolkit that
+ provides high-performance built-in database support for both
+ standalone and client/server applications." (--with-db2)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ DB3 is <ulink url="&url.sleepycat;">Sleepycat Software's
+ DB3</ulink>. (--with-db3)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Cdb is "a fast, reliable, lightweight package for creating and
+ reading constant databases." It is from the author of qmail and
+ can be found <ulink url="&url.cdb;">here</ulink>. Since it is
+ constant, we support only reading operations. (--with-cdb)
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
<para>
<example>
<title>DBA example</title>
- <programlisting>
+ <programlisting role="php">
<?php
-$id = dba_open("/tmp/test.db", "n", "db2");
+$id = dba_open ("/tmp/test.db", "n", "db2");
-if(!$id) {
+if (!$id) {
echo "dba_open failed\n";
exit;
}
-dba_replace("key", "This is an example!", $id);
+dba_replace ("key", "This is an example!", $id);
-if(dba_exists("key", $id)) {
- echo dba_fetch("key", $id);
- dba_delete("key", $id);
+if (dba_exists ("key", $id)) {
+ echo dba_fetch ("key", $id);
+ dba_delete ("key", $id);
}
-dba_close($id);
+dba_close ($id);
?>
-</programlisting></example></para>
-
+ </programlisting>
+ </example>
+ </para>
<para>
DBA is binary safe and does not have any arbitrary limits. It inherits all
- limits set by the underlying database implementation.</para>
-
+ limits set by the underlying database implementation.
+ </para>
<para>
- All file-based databases must provide a way of setting the file mode of a
- new created database, if that is possible at all. The file mode is commonly
- passed as the fourth argument to <function>dba_open</function> or
- <function>dba_popen</function>.</para>
-
+ All file-based databases must provide a way of setting the file
+ mode of a new created database, if that is possible at all. The
+ file mode is commonly passed as the fourth argument to
+ <function>dba_open</function> or <function>dba_popen</function>.
+ </para>
<para>
You can access all entries of a database in a linear way by using the
<function>dba_firstkey</function> and <function>dba_nextkey</function>
- functions. You may not change the database while traversing it.</para>
-
+ functions. You may not change the database while traversing it.
+ </para>
<para>
<example>
<title>Traversing a database</title>
- <programlisting>
+ <programlisting role="php">
<?php
# ...open database...
-$key = dba_firstkey($id);
+$key = dba_firstkey ($id);
-while($key != false) {
- if(...) { # remember the key to perform some action later
+while ($key != false) {
+ if (...) { # remember the key to perform some action later
$handle_later[] = $key;
}
- $key = dba_nextkey($id);
+ $key = dba_nextkey ($id);
}
-for($i = 0; $i < count($handle_later); $i++)
- dba_delete($handle_later[$i], $id);
+for ($i = 0; $i < count($handle_later); $i++)
+ dba_delete ($handle_later[$i], $id);
?>
- </programlisting>
- </example>
+ </programlisting>
+ </example>
</para>
-
</partintro>
<refentry id="function.dba-close">
@@ -130,24 +149,22 @@
<paramdef>int <parameter>handle</parameter></paramdef>
</funcprototype>
</funcsynopsis>
-
<para>
- <function>dba_close</function> closes the established database and frees
- all resources specified by <parameter>handle</parameter>.</para>
-
+ <function>Dba_close</function> closes the established database
+ and frees all resources specified by
+ <parameter>handle</parameter>.
+ </para>
<para>
<parameter>handle</parameter> is a database handle returned by
- <function>dba_open</function>.</para>
-
+ <function>dba_open</function>.
+ </para>
<para>
- <function>dba_close</function> does not return any value.</para>
-
+ <function>Dba_close</function> does not return any value.
+ </para>
<para>
- See also:
- <function>dba_open</function>
+ See also: <function>dba_open</function> and
<function>dba_popen</function>
- </para>
-
+ </para>
</refsect1>
</refentry>
@@ -165,31 +182,28 @@
<paramdef>int <parameter>handle</parameter></paramdef>
</funcprototype>
</funcsynopsis>
-
<para>
<function>dba_delete</function> deletes the entry specified by
<parameter>key</parameter> from the database specified with
- <parameter>handle</parameter>.</para>
-
+ <parameter>handle</parameter>.
+ </para>
<para>
- <parameter>key</parameter> is the key of the entry which is deleted.</para>
-
+ <parameter>key</parameter> is the key of the entry which is
+ deleted.
+ </para>
<para>
<parameter>handle</parameter> is a database handle returned by
- <function>dba_open</function>.</para>
-
+ <function>dba_open</function>.
+ </para>
<para>
<function>dba_delete</function> returns true or false, if the entry is
- deleted or not deleted, respectively.</para>
-
+ deleted or not deleted, respectively.
+ </para>
<para>
- See also:
- <function>dba_exists</function>
- <function>dba_fetch</function>
- <function>dba_insert</function>
- <function>dba_replace</function>
- </para>
-
+ See also: <function>dba_exists</function>,
+ <function>dba_fetch</function>, <function>dba_insert</function>,
+ and <function>dba_replace</function>.
+ </para>
</refsect1>
</refentry>
@@ -207,31 +221,27 @@
<paramdef>int <parameter>handle</parameter></paramdef>
</funcprototype>
</funcsynopsis>
-
<para>
- <function>dba_exists</function> checks whether the specified
+ <function>Dba_exists</function> checks whether the specified
<parameter>key</parameter> exists in the database specified by
- <parameter>handle</parameter>.</para>
-
- <para>
- <parameter>key</parameter> is the key the check is performed for.</para>
-
- <para>
- <parameter>handle</parameter> is a database handle returned by
- <function>dba_open</function>.</para>
-
+ <parameter>handle</parameter>.
+ </para>
<para>
- <function>dba_exists</function> returns true or false, if the key is found
- or not found, respectively.</para>
-
+ <parameter>Key</parameter> is the key the check is performed for.
+ </para>
<para>
- See also:
- <function>dba_fetch</function>
- <function>dba_delete</function>
- <function>dba_insert</function>
- <function>dba_replace</function>
- </para>
-
+ <parameter>Handle</parameter> is a database handle returned by
+ <function>dba_open</function>.
+ </para>
+ <para>
+ <function>Dba_exists</function> returns true or false, if the key is found
+ or not found, respectively.
+ </para>
+ <para>
+ See also: <function>dba_fetch</function>,
+ <function>dba_delete</function>, <function>dba_insert</function>,
+ and <function>dba_replace</function>.
+ </para>
</refsect1>
</refentry>
@@ -249,31 +259,28 @@
<paramdef>int <parameter>handle</parameter></paramdef>
</funcprototype>
</funcsynopsis>
-
<para>
- <function>dba_fetch</function> fetches the data specified by
+ <function>Dba_fetch</function> fetches the data specified by
<parameter>key</parameter> from the database specified with
- <parameter>handle</parameter>.</para>
-
+ <parameter>handle</parameter>.
+ </para>
<para>
- <parameter>key</parameter> is the key the data is specified by.</para>
-
+ <parameter>Key</parameter> is the key the data is specified by.
+ </para>
<para>
- <parameter>handle</parameter> is a database handle returned by
- <function>dba_open</function>.</para>
+ <parameter>Handle</parameter> is a database handle returned by
+ <function>dba_open</function>.
+ </para>
<para>
- <function>dba_fetch</function> returns the associated string or false, if
- the key/data pair is found or not found, respectively.</para>
-
+ <function>Dba_fetch</function> returns the associated string or false, if
+ the key/data pair is found or not found, respectively.
+ </para>
<para>
- See also:
- <function>dba_exists</function>
- <function>dba_delete</function>
- <function>dba_insert</function>
- <function>dba_replace</function>
- </para>
-
+ See also: <function>dba_exists</function>,
+ <function>dba_delete</function>, <function>dba_insert</function>,
+ and <function>dba_replace</function>.
+ </para>
</refsect1>
</refentry>
@@ -290,25 +297,24 @@
<paramdef>int <parameter>handle</parameter></paramdef>
</funcprototype>
</funcsynopsis>
-
<para>
- <function>dba_firstkey</function> returns the first key of the database
- specified by <parameter>handle</parameter> and resets the internal key
- pointer. This permits a linear search through the whole database.</para>
-
- <para>
- <parameter>handle</parameter> is a database handle returned by
- <function>dba_open</function>.</para>
-
+ <function>Dba_firstkey</function> returns the first key of the
+ database specified by <parameter>handle</parameter> and resets
+ the internal key pointer. This permits a linear search through
+ the whole database.
+ </para>
+ <para>
+ <parameter>Handle</parameter> is a database handle returned by
+ <function>dba_open</function>.
+ </para>
+ <para>
+ <function>Dba_firstkey</function> returns the key or false
+ depending on whether it succeeds or fails, respectively.
+ </para>
<para>
- <function>dba_firstkey</function> returns the key or false depending on
- whether it succeeds or fails, respectively.</para>
-
- <para>
See also:
- <function>dba_nextkey</function>
- </para>
-
+ <function>Dba_nextkey</function>
+ </para>
</refsect1>
</refentry>
@@ -620,7 +626,7 @@
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
-sgml-default-dtd-file:"../manual.ced"
+sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
- Next message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions dbm.xml"
- Previous message: Luca Perugini: "[PHP-DOC] cvs: phpdoc /it/functions datetime.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

