- Fixed several spelling and grammatical errors in the PDO documentation.

- Removed displayed author information from the PDO documentation front page.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@237076 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gwynne Raskind 2007-06-06 05:20:48 +00:00
parent 766944915a
commit 249a4edf11
9 changed files with 56 additions and 88 deletions

View file

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<sect1 id="internals.pdo.building">
<title>Building</title>
<para>
The build process is designed to work with PEAR (see <ulink
url="&url.php.pear;"/> for more information about
PEAR). There are two files that are used to assist in configuring your
package for building. The first is config.m4 which is the autoconf
configuration file for all platforms except Win32. The second is config.w32
which a build configuration file for use on Win32. Skeleton files for
these are built for you when you first set up your project. You then need
to customize them to fit the needs of your project. Once you've customized
your config files, you can build your driver using the following sequence
of commands:
package for building. The first is config.m4 which is the
<command>autoconf</command> configuration file for all platforms except
Win32. The second is config.w32 which is a build configuration file for use
on Win32. Skeleton files for these are built for you when you first set up
your project. You then need to customize them to fit the needs of your
project. Once you've customized your config files, you can build your driver
using the following sequence of commands:
</para>
<para>

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<sect1 id="internals.pdo.error-handling">
<title>Error handling</title>
<para>
Error handling is implemented using a hand-shaking protocol between
PDO and the database driver code. The database driver code
signals PDO than an error has occurred via a failure
signals PDO that an error has occurred via a failure
(<literal>0</literal>) return from any of the interface functions. If a zero
is returned, the field <parameter>error_code</parameter> in the control block appropriate to the
context (either the pdo_dbh_t or pdo_stmt_t block). In practice, it is
probably a good idea to set the field in both blocks to the same value to
ensure the correct one is getting used.
is returned, set the field <parameter>error_code</parameter> in the control
block appropriate to the context (either the pdo_dbh_t or pdo_stmt_t block).
In practice, it is probably a good idea to set the field in both blocks to
the same value to ensure the correct one is getting used.
</para>
<para>
@ -39,7 +39,7 @@
</listitem>
<listitem>
<para>
A descriptive string. This string can contain anything additional
A descriptive string. This string can contain any additional
information related to the failure. Database drivers typically include
information such as an error message, code location of the failure, and
any additional descriptive information the driver developer feels

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<sect1 id="internals.pdo.implementing">
<title>Fleshing out your skeleton</title>
<sect2>
@ -207,7 +207,7 @@ PHP_MSHUTDOWN_FUNCTION(pdo_SKEL)
<note>
<para>
Despite being documented here, the PDO driver interface does not specify
that his function be present; it is merely a convenient way to handle
that this function be present; it is merely a convenient way to handle
errors, and it just happens to be equally convenient for the majority of
database client library APIs to structure your driver implementation in
this way.
@ -354,14 +354,14 @@ long sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC)]]></synopsis>
</para>
<para>
One very important responsibility of this function is the processing of SQL
statement parameters. At the time of this call, PDO does not if your driver
supports binding parameters into prepared statements, nor does it know if
it supports named or positional parameter naming conventions.
statement parameters. At the time of this call, PDO does not know if your
driver supports binding parameters into prepared statements, nor does it
know if it supports named or positional parameter naming conventions.
</para>
<para>
Your driver is responsible for setting
<literal>stmt-&gt;supports_placeholders</literal> as appropriate for the
underlying database. This may involved some run-time determination on the
underlying database. This may involve some run-time determination on the
part of your driver, if this setting depends on the version of the database
server to which it is connected. If your driver doesn't directly support
both named and positional parameter conventions, you should use the
@ -399,7 +399,7 @@ long sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC)]]></synopsis>
<constant>PDO_PLACEHOLDER_NONE</constant>. If the driver doesn't support prepare statements at all, then this function should simply allocate any state that it might need, and then return:
</para>
<example>
<title>implementing preparer for drivers that don't support native prepared statements</title>
<title>Implementing preparer for drivers that don't support native prepared statements</title>
<programlisting role="c"><![CDATA[
static int SKEL_handle_preparer(pdo_dbh_t *dbh, const char *sql,
long sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC)
@ -935,9 +935,10 @@ static int SKEL_handle_preparer(pdo_dbh_t *dbh, const char *sql,
<para>
The results of this fetch are driver dependent and the data is usually
stored in the driver_data member of pdo_stmt_t object. The ori and offset
parameters are only meaningful if the statement represents a scrollable
cursor. This function returns 1 for success or 0 in the event of failure.
stored in the driver_data member of the pdo_stmt_t object. The ori and
offset parameters are only meaningful if the statement represents a
scrollable cursor. This function returns 1 for success or 0 in the event of
failure.
</para>
</sect3>
<sect3>
@ -1047,8 +1048,8 @@ static int SKEL_handle_preparer(pdo_dbh_t *dbh, const char *sql,
<function>PDOStatement::fetch</function> calls.
</para>
<para>
If this is a bound parameter, the is_param flag in the param structure,
otherwise, the param structure refers to a bound column.
If this is a bound parameter, the is_param flag in the param structure is
set, otherwise the param structure refers to a bound column.
</para>
<para>
This function returns 1 for success or 0 in the event of failure.
@ -1227,7 +1228,7 @@ static int SKEL_handle_preparer(pdo_dbh_t *dbh, const char *sql,
</warning>
<para>
This function will be called by PDO to retrieve meta-data from the
This function will be called by PDO to retrieve meta data from the
specified column.
</para>
<variablelist>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!--
Authors:
Bill Abt and Rick McGuire of IBM
@ -9,47 +9,6 @@
-->
<chapter id="internals.pdo">
<chapterinfo>
<author>
<firstname>Bill</firstname>
<surname>Abt</surname>
<affiliation>
<shortaffil>IBM</shortaffil>
</affiliation>
</author>
<author>
<firstname>Rick</firstname>
<surname>McGuire</surname>
<affiliation>
<shortaffil>IBM</shortaffil>
</affiliation>
</author>
<author>
<firstname>Wez</firstname>
<surname>Furlong</surname>
<affiliation>
<shortaffil>OmniTI</shortaffil>
</affiliation>
</author>
<copyright>
<year>2005</year>
<holder>IBM Corporation</holder>
</copyright>
<copyright>
<year>2005</year>
<holder>the PHP Documentation Group</holder>
</copyright>
<abstract>
<para>
The purpose of this How-To is to provide a basic understanding of the steps
required to write a database driver that interfaces with the PDO layer.
Please note that this is still an evolving API and as such, subject to
change. This document was prepared based on version 0.3 of PDO.
The learning curve is steep; expect to spend a lot of time on the
prerequisites.
</para>
</abstract>
</chapterinfo>
<title>PDO Driver How-To</title>
&internals.pdo.intro;

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<sect1 id="internals.pdo.intro">
<title>A brief note about this How-To</title>
<para>
@ -8,6 +8,13 @@
to assist in the development of drivers for more databases and to
encourage the emerging standard for database access in PHP.
</para>
<para>
Please note that this is still an evolving API and as such, subject to
change. This document was prepared based on version 0.3 of PDO.
The learning curve is steep; expect to spend a lot of time on the
prerequisites.
</para>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<sect1 id="internals.pdo.pdo-dbh-t">
<title>pdo_dbh_t definition</title>
<para>
@ -121,7 +121,7 @@ struct _pdo_dbh_t {
If your database client library API operates by fetching data into a
caller-supplied buffer, you should set this flag to 1 during your
<function>SKEL_handle_factory</function>. When set, PDO will call your
<function>SKEL_stmt_describer</function> earlier that it would
<function>SKEL_stmt_describer</function> earlier than it would
otherwise. This early call allows you to determine those buffer sizes
and issue appropriate calls to the database client library.
</para>
@ -140,7 +140,7 @@ struct _pdo_dbh_t {
this value to the maximum length that can be taken up by a single
character when it is quoted by your
<function>SKEL_handle_quoter</function> function. This value is used to
calculate the amount of buffer space required when PDO it executes the
calculate the amount of buffer space required when PDO executes the
statement.
</para>
</callout>
@ -175,8 +175,8 @@ struct _pdo_dbh_t {
<constant>PDO_CASE_NATURAL</constant> (this is actually the default).
If the column names are always returned in upper case, set it to
<constant>PDO_CASE_UPPER</constant>. If the column names are always
return in lower case, set it to <constant>PDO_CASE_LOWER</constant>.
The value you set it used to determine if PDO should perform case
returned in lower case, set it to <constant>PDO_CASE_LOWER</constant>.
The value you set is used to determine if PDO should perform case
folding when the user sets the <constant>PDO_ATTR_CASE</constant>
attribute.
</para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<sect1 id="internals.pdo.pdo_stmt_t">
<title>pdo_stmt_t definition</title>
<para>
@ -98,7 +98,7 @@ struct _pdo_stmt_t {
<callout arearefs="internals.pdo.stmt.co.holder"
id="internals.pdo.stmt.co.holder-co">
<para>
Discussed in more detail in <xref linkend="internals.pdo.preparer"/>
Discussed in more detail in <xref linkend="internals.pdo.preparer"/>.
</para>
</callout>
<callout arearefs="internals.pdo.stmt.co.colcount"
@ -109,8 +109,8 @@ struct _pdo_stmt_t {
<function>SKEL_stmt_execute</function> but with some database
implementations, the column count may not be available until
<function>SKEL_stmt_fetch</function> has been called at least once.
Drivers that <function>SKEL_stmt_next_rowset</function> should update the
column count when a new rowset is available.
Drivers that implement <function>SKEL_stmt_next_rowset</function> should
update the column count when a new rowset is available.
</para>
</callout>
<callout arearefs="internals.pdo.stmt.co.cols"
@ -123,8 +123,8 @@ struct _pdo_stmt_t {
<parameter>name</parameter>, <parameter>namelen</parameter> and
<parameter>param_type</parameter> members for each column.
The <parameter>name</parameter> is expected to be allocated using
<function>emalloc</function>; PDO will <function>efree</function> at the
appropriate time.
<function>emalloc</function>; PDO will call <function>efree</function> at
the appropriate time.
</para>
</callout>
</calloutlist>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<sect1 id="internals.pdo.preparation">
<title>Preparation and Housekeeping</title>
<sect2>
@ -23,6 +23,7 @@ pdo_SKEL/
php_pdo_SKEL_int.h <co id="internals.pdo.layout.co.priv"/>
SKEL_dbh.c <co id="internals.pdo.layout.co.dbh"/>
SKEL_stmt.c <co id="internals.pdo.layout.co.stmt"/>
tests/
</screen>
<calloutlist>
<callout arearefs="internals.pdo.layout.co.m4">

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<sect1 id="internals.pdo.prerequisites">
<title>Prerequisites</title>
<para>
@ -16,15 +16,15 @@
<listitem>
<para>A working development environment:</para>
<orderedlist>
<listitem>
<para>Linux: standard development tools, gcc, ld, make, autoconf, automake, etc., versions dependent on distribution;</para>
</listitem>
<listitem>
<para>Other Unix: standard development tools supplied by vendor plus the GNU development tool set; </para>
</listitem>
<listitem>
<para>Win32: Visual Studio compiler suite;</para>
</listitem>
<listitem>
<para>Linux: standard development tools, gcc, ld, make, autoconf, automake, etc., versions dependent on distribution;</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
@ -34,7 +34,7 @@
<para>A working PDO environment (can be installed using 'sudo pecl install PDO'), including the headers which will be needed to access the PDO type definitions and function declarations;</para>
</listitem>
<listitem>
<para>A good working knowledge of the 'C' programming language;</para>
<para>A good working knowledge of the C programming language;</para>
</listitem>
<listitem>
<para>A good working knowledge of the way to write a PHP extension;