[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/reference/pdo=5Fcubrid/_configure.xml_constants.xml_functi
From: Esen_Sagynov <cubrid () php ! net>
Date: 2011-02-21 10:19:38
Message-ID: svn-cubrid-1298283578-308533-1291759149 () svn ! php ! net
[Download RAW message or body]
cubrid Mon, 21 Feb 2011 10:19:38 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308533
Log:
update phpdoc for PDO_CUBRID for version 8.3.1
Changed paths:
U phpdoc/en/trunk/reference/pdo_cubrid/configure.xml
U phpdoc/en/trunk/reference/pdo_cubrid/constants.xml
U phpdoc/en/trunk/reference/pdo_cubrid/functions/PDO-cubrid_schema.xml
U phpdoc/en/trunk/reference/pdo_cubrid/reference.xml
["svn-diffs-308533.txt" (text/x-diff)]
Modified: phpdoc/en/trunk/reference/pdo_cubrid/configure.xml
===================================================================
--- phpdoc/en/trunk/reference/pdo_cubrid/configure.xml 2011-02-21 10:09:50 UTC (rev \
308532)
+++ phpdoc/en/trunk/reference/pdo_cubrid/configure.xml 2011-02-21 10:19:38 UTC (rev \
308533) @@ -5,27 +5,24 @@
<para>
To build the PDO_CUBRID extension, the CUBRID DBMS must be installed on the
same system as PHP.
- </para>
- <para>
+
PDO_CUBRID is a <link xlink:href="&url.pecl;">PECL</link> extension, so
follow the instructions in <xref linkend='install.pecl' /> to install the
PDO_CUBRID extension. Issue the <command>configure</command> command to
point to the location of your CUBRID base dir as follows:
<screen>
<![CDATA[
- bash$ ./configure --with-pdo-cubrid=/path/to/CUBRID[,shared]
+ $ ./configure --with-pdo-cubrid=/path/to/CUBRID[,shared]
]]>
</screen>
The <command>configure</command> command defaults to the value of the
<literal>CUBRID</literal> environment variable.
</para>
<para>
- &pecl.windows.download;
+ &pecl.windows.download; Detailed information about installation on Linux and
+ Windows manually, please read build-guide.html in PECL package CUBRID for
+ reference.
</para>
- <para>
- Information about installation on Linux and Windows manually, please read
- build-guide.html in PECL package CUBRID for reference.
- </para>
</section>
<!-- Keep this comment at the end of the file
Modified: phpdoc/en/trunk/reference/pdo_cubrid/constants.xml
===================================================================
--- phpdoc/en/trunk/reference/pdo_cubrid/constants.xml 2011-02-21 10:09:50 UTC (rev \
308532)
+++ phpdoc/en/trunk/reference/pdo_cubrid/constants.xml 2011-02-21 10:19:38 UTC (rev \
308533) @@ -3,195 +3,107 @@
<section xml:id="pdo-cubrid.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&pdo.driver-constants;
- <variablelist>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_INCLUDE_OID</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <simpara>
- Is used to determine whether to get OID after query execution.
- </simpara>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_TABLE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_VIEW</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_QUERY_SPEC</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_ATTRIBUTE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_TABLE_ATTRIBUTE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_METHOD</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_TABLE_METHOD</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_METHOD_FILE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_SUPER_TABLE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_SUB_TABLE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_CONSTRAINT</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_TRIGGER</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_TABLE_PRIVILEGE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_COL_PRIVILEGE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_DIRECT_SUPER_TABLE</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <constant>PDO::CUBRID_SCH_PRIMARY_KEY</constant>
- (<type>integer</type>)
- </term>
- <listitem>
- <para>
- Is a schema type used for PDO::cubrid_schema function.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ <para>
+ The following constants can be used when getting schema information. They
+ can be passed to <function>PDO::cubrid_schema</function>.
+ <table>
+ <title>CUBRID schema flags</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Constant</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>CUBRID_SCH_TABLE</entry>
+ <entry>Get name and type of table in CUBRID.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_VIEW</entry>
+ <entry>Get name and type of view in CUBRID.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_QUERY_SPEC</entry>
+ <entry>Get the query definition of view.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_ATTRIBUTE</entry>
+ <entry>Get the attributes of table column.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_TABLE_ATTRIBUTE</entry>
+ <entry>Get the attributes of table.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_METHOD</entry>
+ <entry>Get the instance method. The instance method is a method called
+ by a class instance. It is used more often than the class method
+ because most operations are executed in the instance.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_TABLE_METHOD</entry>
+ <entry>Get the class method. The class method is a method called by a
+ class object. It is usually used to create a new class instance or to
+ initialize it. It is also used to access or update class
+ attributes.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_METHOD_FILE</entry>
+ <entry>Get the information of the file where the method of the table is
+ defined.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_SUPER_TABLE</entry>
+ <entry>Get the name and type of table which table inherites attributes
+ from.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_SUB_TABLE</entry>
+ <entry>Get the name and type of table which inherites attributes from
+ this table.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_CONSTRAINT</entry>
+ <entry>Get the table constraints.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_TRIGGER</entry>
+ <entry>Get the table triggers.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_TABLE_PRIVILEGE</entry>
+ <entry>Get the privilege information of table.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_COL_PRIVILEGE</entry>
+ <entry>Get the privilege information of column.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_DIRECT_SUPER_TABLE</entry>
+ <entry>Get the direct super table of table.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_PRIMARY_KEY</entry>
+ <entry>Get the table primary key.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_IMPORTED_KEYS</entry>
+ <entry>Get imported keys of table.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_EXPORTED_KEYS</entry>
+ <entry>Get exported keys of table.</entry>
+ </row>
+ <row>
+ <entry>CUBRID_SCH_CROSS_REFERENCE</entry>
+ <entry>Get reference relationship of tow tables.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
</section>
<!-- Keep this comment at the end of the file
Modified: phpdoc/en/trunk/reference/pdo_cubrid/functions/PDO-cubrid_schema.xml
===================================================================
--- phpdoc/en/trunk/reference/pdo_cubrid/functions/PDO-cubrid_schema.xml 2011-02-21 \
10:09:50 UTC (rev 308532)
+++ phpdoc/en/trunk/reference/pdo_cubrid/functions/PDO-cubrid_schema.xml 2011-02-21 \
10:19:38 UTC (rev 308533) @@ -4,7 +4,7 @@
<refentry xml:id="function.pdo-cubrid_schema" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PDO::cubrid_schema</refname>
- <refpurpose>Is used to get the requested schema information</refpurpose>
+ <refpurpose>Get the requested schema information</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
@@ -15,11 +15,391 @@
<methodparam choice="opt"><type>string</type><parameter>col_name</parameter></methodparam>
</methodsynopsis>
<para>
- The <function>cubrid_schema</function> function is used to get the requested \
schema information from database. You
- have to designate <parameter>table_name</parameter>, if you want to get \
information on certain table,
- <parameter>col_name</parameter>, if you want to get information on certain column \
(can be used only with + This function is used to get the requested schema \
information from + database. You have to designate \
<parameter>table_name</parameter>, if you + want to get information on certain \
table, <parameter>col_name</parameter>, + if you want to get information on certain \
column (can be used only with PDO::CUBRID_SCH_COL_PRIVILEGE).
</para>
+
+ <para>
+ The result of this function is returned as a two-dimensional array (column
+ (associative array) * row (numeric array)). The following tables shows types
+ of schema and the column structure of the result array to be returned based
+ on the schema type.
+ </para>
+
+ <para>
+ <table>
+ <title>Result Composition of Each Type</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Schema</entry>
+ <entry>Column Number</entry>
+ <entry>Column Name</entry>
+ <entry>Value</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>PDO::CUBRID_SCH_TABLE</entry>
+ <entry>1</entry>
+ <entry>NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>TYPE</entry>
+ <entry>0:system table 1:view 2:table</entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_VIEW</entry>
+ <entry>1</entry>
+ <entry>NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>TYPE</entry>
+ <entry>1:view</entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_QUERY_SPEC</entry>
+ <entry>1</entry>
+ <entry>QUERY_SPEC</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_ATTRIBUTE / PDO::CUBRID_SCH_TABLE_ATTRIBUTE</entry>
+ <entry>1</entry>
+ <entry>ATTR_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>DOMAIN</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>3</entry>
+ <entry>SCALE</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>4</entry>
+ <entry>PRECISION</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>5</entry>
+ <entry>INDEXED</entry>
+ <entry>1:indexed</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>6</entry>
+ <entry>NOT NULL</entry>
+ <entry>1:not null</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>7</entry>
+ <entry>SHARED</entry>
+ <entry>1:shared</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>8</entry>
+ <entry>UNIQUE</entry>
+ <entry>1:unique</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>9</entry>
+ <entry>DEFAULT</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>ATTR_ORDER</entry>
+ <entry>base:1</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>11</entry>
+ <entry>CLASS_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>12</entry>
+ <entry>SOURCE_CLASS</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>13</entry>
+ <entry>IS_KEY</entry>
+ <entry>1:key</entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_METHOD / PDO::CUBRID_SCH_TABLE_METHOD</entry>
+ <entry>1</entry>
+ <entry>NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>RET_DOMAIN</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>3</entry>
+ <entry>ARG_DOMAIN</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_METHOD_FILE</entry>
+ <entry>1</entry>
+ <entry>METHOD_FILE</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_SUPER_TABLE / PDO::CUBRID_SCH_DIRECT_SUPER_TABLE / \
PDO::CUBRID_SCH_SUB_TABLE</entry> + <entry>1</entry>
+ <entry>CLASS_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>TYPE</entry>
+ <entry>0:system table 1:view 2:table</entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_CONSTRAINT</entry>
+ <entry>1</entry>
+ <entry>TYPE</entry>
+ <entry>0:unique 1:index 2:reverse unique 3:reverse index</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>3</entry>
+ <entry>ATTR_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>4</entry>
+ <entry>NUM_PAGES</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>5</entry>
+ <entry>NUM_KEYS</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>6</entry>
+ <entry>PRIMARY_KEY</entry>
+ <entry>1:primary key</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>7</entry>
+ <entry>KEY_ORDER</entry>
+ <entry>base:1</entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_TRIGGER</entry>
+ <entry>1</entry>
+ <entry>NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>STATUS</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>3</entry>
+ <entry>EVENT</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>4</entry>
+ <entry>TARGET_CLASS</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>5</entry>
+ <entry>TARGET_ATTR</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>6</entry>
+ <entry>ACTION_TIME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>7</entry>
+ <entry>ACTION</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>8</entry>
+ <entry>PRIORITY</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>9</entry>
+ <entry>CONDITION_TIME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>10</entry>
+ <entry>CONDITION</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_TABLE_PRIVILEGE / \
PDO::CUBRID_SCH_COL_PRIVILEGE</entry> + <entry>1</entry>
+ <entry>CLASS_NAME / ATTR_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>PRIVILEGE</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>3</entry>
+ <entry>GRANTABLE</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_PRIMARY_KEY</entry>
+ <entry>1</entry>
+ <entry>CLASS_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>ATTR_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>3</entry>
+ <entry>KEY_SEQ</entry>
+ <entry>base:1</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>4</entry>
+ <entry>KEY_NAME</entry>
+ <entry></entry>
+ </row>
+
+ <row>
+ <entry>PDO::CUBRID_SCH_IMPORTED_KEYS / PDO::CUBRID_SCH_EXPORTED_KEYS / \
PDO::CUBRID_SCH_CROSS_REFERENCE</entry> + <entry>1</entry>
+ <entry>PKTABLE_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>2</entry>
+ <entry>PKCOLUMN_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>3</entry>
+ <entry>FKTABLE_NAME</entry>
+ <entry>base:1</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>4</entry>
+ <entry>FKCOLUMN_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>5</entry>
+ <entry>KEY_SEQ</entry>
+ <entry>base:1</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>6</entry>
+ <entry>UPDATE_ACTION</entry>
+ <entry>0:cascade 1:restrict 2:no action 3:set null</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>7</entry>
+ <entry>DELETE_ACTION</entry>
+ <entry>0:cascade 1:restrict 2:no action 3:set null</entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>8</entry>
+ <entry>FK_NAME</entry>
+ <entry></entry>
+ </row>
+ <row>
+ <entry></entry>
+ <entry>9</entry>
+ <entry>PK_NAME</entry>
+ <entry></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
@@ -69,16 +449,81 @@
<example>
<title>A <function>PDO::cubrid_schema</function> example</title>
<para>
- This example shows how to get primary keys of table game.
+ This example shows how to get primary key and foreign keys of table game.
</para>
<programlisting role="php">
<![CDATA[
<?php
$pk_list = $dbh->cubrid_schema(PDO::CUBRID_SCH_PRIMARY_KEY, "game");
print_r($pk_list);
+
+$fk_list = $dbh->cubrid_schema(PDO::CUBRID_SCH_IMPORTED_KEYS, "game");
+print_r($fk_list);
?>
]]>
</programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+Result:
+Array
+(
+ [0] => Array
+ (
+ [CLASS_NAME] => game
+ [ATTR_NAME] => athlete_code
+ [KEY_SEQ] => 3
+ [KEY_NAME] => pk_game_host_year_event_code_athlete_code
+ )
+
+ [1] => Array
+ (
+ [CLASS_NAME] => game
+ [ATTR_NAME] => event_code
+ [KEY_SEQ] => 2
+ [KEY_NAME] => pk_game_host_year_event_code_athlete_code
+ )
+
+ [2] => Array
+ (
+ [CLASS_NAME] => game
+ [ATTR_NAME] => host_year
+ [KEY_SEQ] => 1
+ [KEY_NAME] => pk_game_host_year_event_code_athlete_code
+ )
+
+)
+Array
+(
+ [0] => Array
+ (
+ [PKTABLE_NAME] => athlete
+ [PKCOLUMN_NAME] => code
+ [FKTABLE_NAME] => game
+ [FKCOLUMN_NAME] => athlete_code
+ [KEY_SEQ] => 1
+ [UPDATE_RULE] => 1
+ [DELETE_RULE] => 1
+ [FK_NAME] => fk_game_athlete_code
+ [PK_NAME] => pk_athlete_code
+ )
+
+ [1] => Array
+ (
+ [PKTABLE_NAME] => event
+ [PKCOLUMN_NAME] => code
+ [FKTABLE_NAME] => game
+ [FKCOLUMN_NAME] => event_code
+ [KEY_SEQ] => 1
+ [UPDATE_RULE] => 1
+ [DELETE_RULE] => 1
+ [FK_NAME] => fk_game_event_code
+ [PK_NAME] => pk_event_code
+ )
+
+)
+]]>
+ </screen>
</example>
</para>
</refsect1>
Modified: phpdoc/en/trunk/reference/pdo_cubrid/reference.xml
===================================================================
--- phpdoc/en/trunk/reference/pdo_cubrid/reference.xml 2011-02-21 10:09:50 UTC (rev \
308532)
+++ phpdoc/en/trunk/reference/pdo_cubrid/reference.xml 2011-02-21 10:19:38 UTC (rev \
308533) @@ -16,8 +16,7 @@
</para>
<note>
<para>
- Current version of PDO_CUBRID doesn't support persistent connection and
- lobs type now.
+ Current version of PDO_CUBRID doesn't support persistent connection now.
</para>
</note>
</section>
@@ -25,27 +24,104 @@
<!-- Information found in configure.xml -->
&reference.pdo-cubrid.configure;
- <section xml:id="ref.pdo-cubrid.features.cursors">
- <title>Scrollable cursors</title>
- <para>
- PDO_CUBRID supports scrollable cursors, and the default cursor type
- is forward only. You can use PDO::setAttribute to change cursor type.
- </para>
+ <section xml:id="ref.pdo-cubrid.features">
+ <title>Features</title>
+ <table>
+ <title>PDO_CUBRID Features</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Scrollable cursors</entry>
+ <entry>
+ PDO_CUBRID supports scrollable cursors. The default cursor type is
+ forward only, and you can use parameter driver_options in
+ <function>PDO::prepare</function> to change cursor type.
+ </entry>
+ </row>
+ <row>
+ <entry>Timeout</entry>
+ <entry>PDO_CUBRID supports sql statement execution timeout setting;
+ You can use <function>PDO::setAttribute</function> to set timeout \
value.</entry> + </row>
+ <row>
+ <entry>Autocommit_mode and Transaction</entry>
+ <entry>
+ PDO_CUBRID supports both autocommit_mode and transaction, and
+ autocommit_mode is enable by default. You can use
+ <function>PDO::setAttribute</function> to change its state.
+
+ <para>
+ If you use PDO::beginTransaction to begin a transaction, it will
+ disable autocommit_mode and restore it after PDO::commit or
+ PDO::rollBack. Note that before disabling the autocommit_mode, any
+ pending work is automatically committed.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>Multiple Query</entry>
+ <entry>PDO_CUBRID supports multiple query.</entry>
+ </row>
+ <row>
+ <entry>Schema Information</entry>
+ <entry>PDO_CUBRID doesn't implement PDOStatement->getColumnMeta.
+ Instead, PDO_CUBRID implements a function
+ <function>PDO::cubrid_schema</function> to get schema information.
+ </entry>
+ </row>
+ <row>
+ <entry>LOBs</entry>
+ <entry>PDO_CUBRID supports BLOB/CLOB data type. The LOB in PDO is
+ represented as a stream, so you can insert LOBs by binding a stream,
+ and get LOBs by reading a stream returned by CUBRID PDO. For example:
+
+ <para>
+ <example><title>Insert LOBs in CUBRID PDO</title>
+ <programlisting role='php'>
+<![CDATA[
+<?php
+$fp = fopen('lob_test.png', 'rb');
+
+$sql_stmt = "INSERT INTO lob_test(name, content) VALUES('lob_test.png', ?)";
+
+$stmt = $dbh->prepare($sql_stmt);
+$ret = $stmt->bindParam(1, $fp, PDO::PARAM_LOB);
+$ret = $stmt->execute();
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ <example><title>Fetch LOBs in CUBRID PDO</title>
+ <programlisting role='php'>
+<![CDATA[
+<?php
+$sql_stmt = "SELECT content FROM lob_test WHERE name='lob_test.png'";
+
+$stmt = $dbh->prepare($sql_stmt);
+$stmt->execute();
+$result = $stmt->fetch(PDO::FETCH_NUM);
+
+header("Content-Type: image/png");
+fpassthru($result[0]);
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
- <section xml:id="ref.pdo-cubrid.features.autocommit">
- <title>Autocommit</title>
- <para>
- PDO_CUBRID supports autocommit, and it is disable by default. You can use
- PDO::setAttribute to enable it.
- </para>
- </section>
- <section xml:id="ref.pdo-cubrid.features.timeout">
- <title>Timeout</title>
- <para>
- PDO_CUBRID supports sql statement execution timeout setting; You can use
- PDO::setAttribute to set timeout value.
- </para>
- </section>
<!-- Information found in constants.xml -->
&reference.pdo-cubrid.constants;
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic