PDO driver for CUBRID.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@305103 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Esen Sagynov 2010-11-05 14:03:17 +00:00
parent 568b69c994
commit 220c46381e
6 changed files with 521 additions and 0 deletions

View file

@ -18,6 +18,10 @@
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ref.pdo-cubrid">PDO_CUBRID</link></entry>
<entry>Cubrid</entry>
</row>
<row>
<entry><link linkend="ref.pdo-dblib">PDO_DBLIB</link></entry>
<entry>FreeTDS / Microsoft SQL Server / Sybase</entry>
@ -64,6 +68,7 @@
</para>
</partintro>
&reference.pdo-cubrid.reference;
&reference.pdo-dblib.reference;
&reference.pdo-firebird.reference;
&reference.pdo-ibm.reference;

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<section xml:id="ref.pdo-cubrid.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.install;
<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]
]]>
</screen>
The <command>configure</command> command defaults to the value of the
<literal>CUBRID</literal> environment variable.
</para>
<para>
&pecl.windows.download;
</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
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,216 @@
<?xml version='1.0' encoding="utf-8"?>
<!-- $Revision: 297078 $ -->
<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_ATTR_PRIMARY_KEY</constant>
(<type>integer</type>)
</term>
<listitem>
<para>
Is a schema type used for PDO::cubrid_schema function.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1 @@
&reference.pdo-cubrid.functions.PDO-cubrid-schema;

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<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>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>PDO::cubrid_schema</methodname>
<methodparam><type>int</type><parameter>schema_type</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>table_name</parameter></methodparam>
<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
PDO::CUBRID_SCH_COL_PRIVILEGE).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>schema_type</parameter></term>
<listitem>
<para>
Schema type that you want to know.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>table_name</parameter></term>
<listitem>
<para>
Table you want to know the schema of.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>col_name</parameter></term>
<listitem>
<para>
Column you want to know the schema of.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Array containing the schema information, when process is successful;
</para>
<para>
FALSE, when process is unsuccessful
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>PDO::cubrid_schema</function> example</title>
<para>
This example shows how to get primary 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);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -0,0 +1,142 @@
<?xml version='1.0' encoding="utf-8"?>
<!-- $Revision: 297816 $ -->
<!-- Purpose: database.vendors -->
<!-- Membership: bundled, external, pecl -->
<reference xml:id="ref.pdo-cubrid" xmlns="http://docbook.org/ns/docbook">
<title>CUBRID Functions (PDO_CUBRID)</title>
<titleabbrev>CUBRID (PDO)</titleabbrev>
<partintro>
<section xml:id="pdo-cubrid.intro">
&reftitle.intro;
<para>
PDO_CUBRID is a driver that implements the <link linkend="intro.pdo">PHP Data Objects (PDO) interface</link> to
enable access from PHP to CUBRID databases.
</para>
<note>
<para>
Current version of PDO_CUBRID doesn't support persistent connection and
lobs type now.
</para>
</note>
</section>
<!-- 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>
<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;
</partintro>
<refentry xml:id="ref.pdo-cubrid.connection">
<refnamediv>
<refname>PDO_CUBRID DSN</refname>
<refpurpose>Connecting to CUBRID databases</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
The PDO_CUBRID Data Source Name (DSN) is composed of the following elements, delimited by semicolons:
<variablelist>
<varlistentry>
<term>DSN prefix</term>
<listitem>
<para>
The DSN prefix is <userinput>cubrid:</userinput>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>host</constant></term>
<listitem>
<para>
The hostname on which the database server resides.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>port</constant></term>
<listitem>
<para>
The port on which the database server is running.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>dbname</constant></term>
<listitem>
<para>
The name of the database.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>PDO_CUBRID DSN examples</title>
<para>
The following example shows a PDO_CUBRID DSN for connecting to a CUBRID database:
<programlisting><![CDATA[
cubrid:host=localhost;port=33000;dbname=demodb
]]>
</programlisting>
</para>
</example>
</para>
</refsect1>
</refentry>
&reference.pdo-cubrid.entities.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->