cvs: peardoc /en/package/database/mdb2 intro-portability.xml
| From: | Lukas Smith | Date: | Fri, 05 May 2006 11:48:15 +0000 |
| Subject: | cvs: peardoc /en/package/database/mdb2 intro-portability.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-7873@lists.php.net to get a copy of this message | ||
lsmith Fri May 5 11:48:15 2006 UTC
Modified files:
/peardoc/en/package/database/mdb2 intro-portability.xml
Log:
- updated for MDB2
http://cvs.php.net/viewcvs.cgi/peardoc/en/package/database/mdb2/intro-portability.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/database/mdb2/intro-portability.xml
diff -u peardoc/en/package/database/mdb2/intro-portability.xml:1.1
peardoc/en/package/database/mdb2/intro-portability.xml:1.2
--- peardoc/en/package/database/mdb2/intro-portability.xml:1.1 Sun Apr 30 20:26:15 2006
+++ peardoc/en/package/database/mdb2/intro-portability.xml Fri May 5 11:48:15 2006
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.1 $ -->
-
-<!-- needs fixing for MDB2-->
+<!-- $Revision: 1.2 $ -->
<refentry id="package.database.mdb2.intro-portability">
<refnamediv>
@@ -23,8 +21,8 @@
You control which portability modes are enabled by using
the <varname>portability</varname> configuration option.
Configuration options are set via
- <link linkend="package.database.mdb2.db.connect">
- <function>connect</function></link> and
+ <link linkend="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2.html#methodfactory">
+ <function>factory</function></link> and
<link linkend="http://pear.php.net/package/MDB2/docs/latest/MDB2/MDB2_Driver_Common.html#methodsetoption">
<function>setOption</function></link>.
</para>
@@ -45,7 +43,7 @@
<constant>MDB2_PORTABILITY_ALL</constant>
</para>
<para>
- turn on all portability features
+ turn on all portability features. this is the default setting.
</para>
</listitem>
@@ -62,6 +60,16 @@
queries.
</para>
</listitem>
+ <listitem>
+ <para>
+ <constant>MDB2_PORTABILITY_EMPTY_TO_NULL</constant>
+ </para>
+ <para>
+ convert empty strings values to null in data in and output.
+ Needed because Oracle considers empty strings to be null,
+ while most other DBMS's know the difference between empty and null.
+ </para>
+ </listitem>
<listitem>
<para>
@@ -116,24 +124,6 @@
</entry>
</row>
- <row>
- <entry>
- odbc(access)
- </entry>
- <entry>
- MS's ODBC driver mistakenly reports 'no such field' as code
- <computeroutput>07001</computeroutput>, which means
- 'too few parameters.' When this option is on,
- that code gets remapped.
- </entry>
- <entry>
- <constant>MDB2_ERROR_MISMATCH</constant>
- </entry>
- <entry>
- <constant>MDB2_ERROR_NOSUCHFIELD</constant>
- </entry>
- </row>
-
</tbody>
</tgroup>
</table>
@@ -143,31 +133,30 @@
<listitem>
<para>
- <constant>MDB2_PORTABILITY_LOWERCASE</constant>
+ <constant>MDB2_PORTABILITY_FIX_ASSOC_FIELD_NAMES</constant>
</para>
<para>
- convert names of tables and fields to lower case when using
- <function>get*</function>, <function>fetch*</function> and
- <function>tableInfo</function>
+ this removes any qualifiers from keys in associative fetches. some
+ RDBMS , like for example SQLite, will be default use the fully qualified
+ name for a column in assoc fetches if it is qualified in a query.
</para>
</listitem>
<listitem>
<para>
- <constant>MDB2_PORTABILITY_NONE</constant> (default)
+ <constant>MDB2_PORTABILITY_FIX_CASE</constant>
</para>
<para>
- turn off all portability features
+ convert names of tables and fields to lower or upper case in all methods.
+ the case depends on the 'field_case' option that may be set to either
+ <constant>CASE_LOWER</constant> or <constant>CASE_UPPER</constant>
</para>
</listitem>
<listitem>
<para>
- <constant>MDB2_PORTABILITY_NULL_TO_EMPTY</constant>
+ <constant>MDB2_PORTABILITY_NONE</constant> (default)
</para>
<para>
- convert null values to empty strings in data output by
- <function>get*</function> and <function>fetch*</function>.
- Needed because Oracle considers empty strings to be null,
- while most other DBMS's know the difference between empty and null.
+ turn off all portability features
</para>
</listitem>
<listitem>
@@ -192,40 +181,10 @@
</para>
</refsect1>
- <refsect1 id="package.database.mdb2.intro-portability.compatibility">
- <title>Backwards Compatibility</title>
- <para>
- Some of this functionality used to be handled by the now deprecated
- <varname>optimize</varname> option. For backwards compatibility, when
- this option is set to <literal>portability</literal>, the following
- databases get these portability modes turned on:
- <itemizedlist>
- <listitem>
- <para>
- oci8:
- <constant>MDB2_PORTABILITY_LOWERCASE</constant> and
- <constant>MDB2_PORTABILITY_DELETE_COUNT</constant>
- </para>
- </listitem>
- <listitem>
- <para>
- fbsql, mysql, mysqli, sqlite:
- <constant>MDB2_PORTABILITY_DELETE_COUNT</constant>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- When the <varname>optimize</varname> option gets set to
- <literal>performance</literal> the portability mode is switched to
- <constant>MDB2_PORTABILITY_NONE</constant>.
- </para>
- </refsect1>
-
<refsect1 id="package.database.mdb2.intro-portability.example">
&title.example;
<example>
- <title>Turning on all portability options while connecting</title>
+ <title>Disabling all portability options while connecting</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -234,7 +193,7 @@
$dsn = 'mysql://user:password@host/database'
$options = array(
'debug' => 2,
- 'portability' => MDB2_PORTABILITY_ALL,
+ 'portability' => MDB2_PORTABILITY_NONE,
);
$mdb2 =& MDB2::connect($dsn, $options);