<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.4.9" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
 <name>DB_Table</name>
 <channel>pear.php.net</channel>
 <summary>Builds on PEAR DB to abstract datatypes and automate table creation, data validation, insert, update, delete, and select; combines these with PEAR HTML_QuickForm to automatically generate input forms that match the table column definitions.</summary>
 <description>Builds on PEAR DB to abstract datatypes and automate table creation, data validation, insert, update, delete, and select; combines these with PEAR HTML_QuickForm to automatically generate input forms that match the table column definitions.</description>
 <lead>
  <name>Paul M. Jones</name>
  <user>pmjones</user>
  <email>pmjones@php.net</email>
  <active>yes</active>
 </lead>
 <lead>
  <name>Mark Wiesemann</name>
  <user>wiesemann</user>
  <email>wiesemann@php.net</email>
  <active>yes</active>
 </lead>
 <date>2006-04-26</date>
 <time>17:55:05</time>
 <version>
  <release>1.3.0</release>
  <api>1.3.0</api>
 </version>
 <stability>
  <release>stable</release>
  <api>stable</api>
 </stability>
 <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
 <notes>Short summary:
* New table creation modes &apos;verify&apos; and &apos;alter&apos;
* Primary keys are now supported
* MDB2 is now supported as database backend
* Firebird DBMS is now supported (but Interbase isn&apos;t)
* Auto-creation of QuickForm rules can be disabled now
* Usage of QuickForm and custom QuickForm elements is now more flexible
* Internationalizing/customizing of error messages now easier

Minor changes in detail:
* Improvement related to bug report #5679: many arrays (in the
  table definition and as function parameters) may now be null
  (of course, an empty array is still allowed).
* The column definition array $col may not be empty because it
  isn&apos;t possible to create empty database tables and because
  the work with DB_Table makes only sense with at least one
  column.
* Fixed several return by reference problems (that caused
  notices in PHP 4.4.x and 5.x).
* Fixed several &quot;undefined index&quot; problems (causing notices).
* Bugfix: select() and selectResult() didn&apos;t return error
  objects caused due to problems in $sql array.
* Bugfix: static usage of DB_Table_QuickForm::createForm()
  resulted in fatal error when &apos;formName&apos; wasn&apos;t specified
  in the $args parameter.
* Request #5965: Turn off automatic setting of default QF rules
  like &apos;numeric&apos; or &apos;required&apos; (can be done by setting
  $cols[...][&apos;qf_set_default_rules&apos;] = false).
  (thanks to Arne Bippes)
* Bug #6025: DB_Table no longer tries to create a table if a
  table with the same name but with different use of lower and
  upper letters.
* Request #6036: new qf_type &apos;callback&apos; which allows to add
  custom QF elements that need more than the standard
  parameters. You need to specify a key named &apos;qf_callback&apos;,
  filled with either the name of a class (this class needs to
  have a method &apos;createElement&apos;) or the name of a method.
  Both method types must return true if the element was created
  successfully. (thanks to Arne Bippes)
* The dependency on the Date package was removed.
* In addition to the option to internationalize some error messages
  via $GLOBALS[&apos;_DB_TABLE&apos;][&apos;error&apos;], you can now use
  setErrorMessage() like this (assuming $obj is your DB_Table instance):
    $obj-&gt;setErrorMessage(DB_TABLE_ERR_PHPTYPE, &apos;localized message&apos;);
  or to set more than one message:
    $obj-&gt;setErrorMessage(array(DB_TABLE_ERR_PHPTYPE =&gt; &apos;message 1&apos;,
                                DB_TABLE_ERR_NOT_DB_OBJECT =&gt; &apos;message 2&apos;));
  Static calls (DB_Table::setErrorMessage(...)) are also valid.
  Setting the error messages via a static call or $GLOBALS is
  especially needed for errors that can occur with-in the
  constructor call (i.e. e.g. creating or altering the database table).
* Fixed handling of QuickForm rules: If there was a server-side-only
  rule (like &apos;uploadedfile&apos;), client-side validation was disabled
  for all rules. Now it is disabled only for server-side-only rules.
* You can now use an extended HTML_QuickForm object by specifying
  the class name in $_DB_TABLE[&apos;qf_class_name&apos;]. (Attention: You
  have to include the extended class file yourself.)

Major changes / enhancements in detail:
* Request #5478: Verification/check, whether the table exists,
  whether all the columns exist, whether the columns have the
  right type, and whether the indexes exists. This can be used
  by setting $create in the constructor of your extended class
  to &apos;verify&apos; instead of false/&apos;safe&apos;/&apos;drop&apos;. In case of an
  error in the schema, you will find the PEAR_Error object in
  $obj-&gt;error (assuming $obj is your DB_Table instance).
  - This is not available for &apos;fbsql&apos; and &apos;mssql&apos; phptypes.
    (&apos;fbsql&apos; is likely to be not supported in the future, while
    &apos;mssql&apos; will be added when MDB2 has support for index and
    constraint information for this DBMS.)
* New creation mode &apos;alter&apos;: If the table does not exist, it will
  be created. Otherwise, table fields&apos; existance and types will be
  checked and, if needed, the field(s) will be added or changed. The
  same applies for indexes&apos; and constraints&apos; existance and types.
  Columns/indexes/constraints that don&apos;t exist anymore in the table
  definition class, will NOT be removed.              
  - This is a new and powerful feature, use it with caution -- changing
    a string datatype into a numeric datatype in your table definition
    class may lead to data loss.
  - Using &quot; $_DB_TABLE[&apos;debug&apos;] = true; &quot; in your scripts will
    output what will be changed. If something unexpected is changed,
    please report it via PEAR&apos;s bug tracker (please include the
    debug message and the column and/or index definition from your
    table definition class, thanks).
  - This is not available for &apos;fbsql&apos; and &apos;mssql&apos; phptypes.
    (&apos;fbsql&apos; is likely to be not supported in the future, while
    &apos;mssql&apos; will be added when MDB2 has support for index and
    constraint information for this DBMS.)
  (thanks to Arne Bippes for the initial idea)
* Support for primary keys: In the $idx array one index can be
  marked as &apos;primary&apos; and will be created as the primary key of
  the chosen table.
  - This not available for &apos;sqlite&apos; phptype, as SQLite does not
    support primary keys.
* Request #6384: DB_Table now supports also MDB2 as the database
  backend. Just pass an MDB2 instance instead of a DB instance to
  the constructor. (thanks to Lukas Smith for the initial patch)
* DB_Table now supports the Firebird DBMS (version &gt;= 1.5
  required). Because of the limited features of Interbase
  (its ancestor), only Firebird is supported. Therefore,
  &apos;dbsyntax&apos; must be set to &apos;firebird&apos; in your DSN. Please note
  that the ibase extension is very buggy in PHP 4, while it works
  good with PHP 5.

Only relevant if you are using localized error messages:
* Please note that there are eleven new error messages and that the
  messages for DB_TABLE_ERR_NOT_DB_OBJECT and DB_TABLE_ERR_PHPTYPE
  slightly differ from the old messages.</notes>
 <contents>
  <dir name="/">
   <file md5sum="a28045ccb9708ebd8529b35ace45b579" name="DB/Table/Manager/ibase.php" role="php" />
   <file md5sum="63a1942c30a5982a4d58d676301637d0" name="DB/Table/Manager/mysql.php" role="php" />
   <file md5sum="0d45d0f4f0c3142d091f057f1d6ba983" name="DB/Table/Manager/mysqli.php" role="php" />
   <file md5sum="5c28706ee407e0c268ea023e50ca1f1f" name="DB/Table/Manager/oci8.php" role="php" />
   <file md5sum="7a2dce0d87842bfef5e423e2d9a46231" name="DB/Table/Manager/pgsql.php" role="php" />
   <file md5sum="90a9d1bc65f5927a43f9699ad0b8553e" name="DB/Table/Manager/sqlite.php" role="php" />
   <file md5sum="f1d9fcb84969d86794d0e3b8b644c44c" name="DB/Table/Date.php" role="php" />
   <file md5sum="5a2589bd966a5695d6af1b85cab2a170" name="DB/Table/Manager.php" role="php" />
   <file md5sum="5098f5d0598d926275bb130eb15a9235" name="DB/Table/QuickForm.php" role="php" />
   <file md5sum="d920c8c1972ba9fddddb7b3dec9b28a4" name="DB/Table/Valid.php" role="php" />
   <file md5sum="d862efd5045c569ca8ebbe04d14ba587" name="DB/Table.php" role="php">
    <tasks:replace from="@package_version@" to="version" type="package-info" />
   </file>
   <file md5sum="901ec926b86fbe062ca89f88f5c73ded" name="docs/reserved_words/all-words.txt" role="doc" />
   <file md5sum="74390d93614543e1c73596ab6fa95002" name="docs/reserved_words/mssql-words.txt" role="doc" />
   <file md5sum="9792629daf6196b5c11b197bbc9ff758" name="docs/reserved_words/mysql-words.txt" role="doc" />
   <file md5sum="cb0fb75b767bcc0cc9d8af2fe0cf1c4a" name="docs/reserved_words/oci8-words.txt" role="doc" />
   <file md5sum="b11b385bf7469ae3b4564866fc12504d" name="docs/reserved_words/pgsql-words.txt" role="doc" />
   <file md5sum="5be1d1483d8fc17b62d2cba2be011ec4" name="docs/reserved_words/sql92-words.txt" role="doc" />
   <file md5sum="2dbbb83a3a2737c3b76c344101ae3b6f" name="docs/reserved_words/sql99-words.txt" role="doc" />
   <file md5sum="dd1bd10c2a281bcad4b2ebf47fdaf233" name="docs/reserved_words/sqlite-words.txt" role="doc" />
   <file md5sum="8a8ef6d347107eecdd1279b66a7ce31a" name="docs/reserved_words/_sources.txt" role="doc" />
   <file md5sum="2a013c43c110efc37a04c4f811d2f162" name="tests/bogotest.php" role="test" />
   <file md5sum="6a21cabe4fed7d9eb28a8f1e4f3e8739" name="tests/setup.ini-dist" role="test" />
  </dir>
 </contents>
 <dependencies>
  <required>
   <php>
    <min>4.0.0</min>
   </php>
   <pearinstaller>
    <min>1.4.0b1</min>
   </pearinstaller>
  </required>
  <optional>
   <package>
    <name>HTML_QuickForm</name>
    <channel>pear.php.net</channel>
   </package>
   <package>
    <name>DB</name>
    <channel>pear.php.net</channel>
    <min>1.7.6</min>
   </package>
   <package>
    <name>MDB2</name>
    <channel>pear.php.net</channel>
    <min>2.0.1</min>
   </package>
  </optional>
 </dependencies>
 <phprelease />
</package>
