cvs: peardoc /en/package/database/db intro-sequences.xml /en/package/database/db/db-common createsequence.xml dropsequence.xml nextid.xml

From: Date: Wed, 04 Aug 2004 14:39:51 +0000
Subject: cvs: peardoc /en/package/database/db intro-sequences.xml /en/package/database/db/db-common createsequence.xml dropsequence.xml nextid.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4724@lists.php.net to get a copy of this message
danielc Wed Aug 4 10:39:51 2004 EDT Modified files: /peardoc/en/package/database/db intro-sequences.xml /peardoc/en/package/database/db/db-common createsequence.xml dropsequence.xml nextid.xml Log: * Clarify sequence naming issues and the need to not mix PEAR DB sequence stuff with native sequence stuff. http://cvs.php.net/diff.php/peardoc/en/package/database/db/intro-sequences.xml?r1=1.18&r2=1.19&ty=u Index: peardoc/en/package/database/db/intro-sequences.xml diff -u peardoc/en/package/database/db/intro-sequences.xml:1.18 peardoc/en/package/database/db/intro-sequences.xml:1.19 --- peardoc/en/package/database/db/intro-sequences.xml:1.18 Thu Apr 15 14:44:26 2004 +++ peardoc/en/package/database/db/intro-sequences.xml Wed Aug 4 10:39:50 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.18 $ --> +<!-- $Revision: 1.19 $ --> <refentry id="package.database.db.intro-sequences"> <refnamediv> @@ -47,23 +47,39 @@ <refsect1 id="package.database.db.intro-sequences.note"> &title.note; - <para> - If you need to manually access the database objects PEAR DB uses - to store sequence information, take note that the backend objects - are named by passing the <parameter>$seq_name</parameter> argument - you provide to PEAR DB's sequence methods through PHP's - <function>sprintf</function> function using the value from the - <varname>seqname_format</varname> option as the - <function>sprintf</function> format argument. - </para> - <para> - The default <varname>seqname_format</varname> is - <literal>%s_seq</literal>, which can be changed when - <link linkend="package.database.db.db.connect"> - <function>connect</function></link>'ing or via - <link linkend="package.database.db.db-common.setoption"> - <function>setOption</function></link>. - </para> + <warning> + <para> + When using PEAR DB's sequence methods, we strongly advise using + these methods for all procedures, including the creation of the + sequences. Do not use PEAR DB's methods to access + sequences that were created directly in the DBMS. + </para> + <para> + If you have a compelling reason to ignore this advice, be aware + that the <parameter>$seq_name</parameter> argument given to all of + PEAR DB's sequence methods are modified before DB calls the + underlying DBMS. + </para> + <para> + <parameter>$seq_name</parameter> is passed through PHP's + <function>sprintf</function> function using the value from the + <varname>seqname_format</varname> option as + <function>sprintf</function>'s format argument. + The default <varname>seqname_format</varname> is + <literal>%s_seq</literal>. So, for example, if you use + <literal>person_id_sequence</literal> as the + <parameter>$seq_name</parameter>, PEAR DB will change that + name to <literal>person_id_sequence_seq</literal> when + querying the DBMS about creating/accessing/updating the sequence. + </para> + <para> + The <varname>seqname_format</varname> can be modified when + <link linkend="package.database.db.db.connect"> + <function>connect</function></link>'ing or via + <link linkend="package.database.db.db-common.setoption"> + <function>setOption</function></link>. + </para> + </warning> </refsect1> <refsect1 id="package.database.db.intro-sequences.see"> http://cvs.php.net/diff.php/peardoc/en/package/database/db/db-common/createsequence.xml?r1=1.18&r2=1.19&ty=u Index: peardoc/en/package/database/db/db-common/createsequence.xml diff -u peardoc/en/package/database/db/db-common/createsequence.xml:1.18 peardoc/en/package/database/db/db-common/createsequence.xml:1.19 --- peardoc/en/package/database/db/db-common/createsequence.xml:1.18 Mon Apr 26 00:39:08 2004 +++ peardoc/en/package/database/db/db-common/createsequence.xml Wed Aug 4 10:39:50 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.18 $ --> +<!-- $Revision: 1.19 $ --> <refentry id="package.database.db.db-common.createsequence"> <refnamediv> @@ -90,6 +90,17 @@ <refsect1 id="package.database.db.db-common.createsequence.note"> &title.note; &note.notstatic; + <warning> + <para> + When using PEAR DB's sequence methods, we strongly advise using + these methods for all procedures, including the creation of the + sequences. Do not use PEAR DB's methods to access + sequences that were created directly in the DBMS. <link + linkend="package.database.db.intro-sequences.note">See the warning + on the <quote>Intro - Sequences</quote> page</link> + complete information. + </para> + </warning> </refsect1> <refsect1 id="package.database.db.db-common.createsequence.example"> http://cvs.php.net/diff.php/peardoc/en/package/database/db/db-common/dropsequence.xml?r1=1.17&r2=1.18&ty=u Index: peardoc/en/package/database/db/db-common/dropsequence.xml diff -u peardoc/en/package/database/db/db-common/dropsequence.xml:1.17 peardoc/en/package/database/db/db-common/dropsequence.xml:1.18 --- peardoc/en/package/database/db/db-common/dropsequence.xml:1.17 Mon Apr 26 00:39:08 2004 +++ peardoc/en/package/database/db/db-common/dropsequence.xml Wed Aug 4 10:39:50 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.17 $ --> +<!-- $Revision: 1.18 $ --> <refentry id="package.database.db.db-common.dropsequence"> <refnamediv> @@ -90,6 +90,17 @@ <refsect1 id="package.database.db.db-common.dropsequence.note"> &title.note; &note.notstatic; + <warning> + <para> + When using PEAR DB's sequence methods, we strongly advise using + these methods for all procedures, including the creation of the + sequences. Do not use PEAR DB's methods to access + sequences that were created directly in the DBMS. <link + linkend="package.database.db.intro-sequences.note">See the warning + on the <quote>Intro - Sequences</quote> page</link> + complete information. + </para> + </warning> </refsect1> <refsect1 id="package.database.db.db-common.dropsequence.example"> http://cvs.php.net/diff.php/peardoc/en/package/database/db/db-common/nextid.xml?r1=1.21&r2=1.22&ty=u Index: peardoc/en/package/database/db/db-common/nextid.xml diff -u peardoc/en/package/database/db/db-common/nextid.xml:1.21 peardoc/en/package/database/db/db-common/nextid.xml:1.22 --- peardoc/en/package/database/db/db-common/nextid.xml:1.21 Sat May 1 12:57:29 2004 +++ peardoc/en/package/database/db/db-common/nextid.xml Wed Aug 4 10:39:50 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.21 $ --> +<!-- $Revision: 1.22 $ --> <refentry id="package.database.db.db-common.nextid"> <refnamediv> @@ -132,6 +132,17 @@ <refsect1 id="package.database.db.db-common.nextid.note"> &title.note; &note.notstatic; + <warning> + <para> + When using PEAR DB's sequence methods, we strongly advise using + these methods for all procedures, including the creation of the + sequences. Do not use PEAR DB's methods to access + sequences that were created directly in the DBMS. <link + linkend="package.database.db.intro-sequences.note">See the warning + on the <quote>Intro - Sequences</quote> page</link> + complete information. + </para> + </warning> </refsect1> <refsect1 id="package.database.db.db-common.nextid.example">

« previous php.pear.doc (#4724) next »