[docs] docs - heins modified ictags.sdf
docs@interchange.redhat.com
docs@interchange.redhat.com
Sun Jul 7 18:00:02 2002
User: heins
Date: 2002-07-07 21:59:22 GMT
Modified: . ictags.sdf
Log:
* Minor documentation update for [counter ...], add Oracle info.
Revision Changes Path
1.90 +55 -7 docs/ictags.sdf
rev 1.90, prev_rev 1.89
Index: ictags.sdf
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/docs/ictags.sdf,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- ictags.sdf 3 Jul 2002 18:59:57 -0000 1.89
+++ ictags.sdf 7 Jul 2002 21:59:22 -0000 1.90
@@ -1,10 +1,10 @@
!init OPT_LOOK=3D"akopia"; OPT_STYLE=3D"manual"=20
-# $Id: ictags.sdf,v 1.89 2002/07/03 18:59:57 mheins Exp $
+# $Id: ictags.sdf,v 1.90 2002/07/07 21:59:22 mheins Exp $
=20
!define DOC_NAME "Interchange Tags Reference"
!define DOC_TYPE ""
!define DOC_CODE "ictags"
-!define DOC_VERSION substr('$Revision: 1.89 $', 11, -2)
+!define DOC_VERSION substr('$Revision: 1.90 $', 11, -2)
!define DOC_STATUS "Draft"
!define DOC_PROJECT "Interchange"
!define DOC_URL "http://interchange.redhat.com/doc/ictags.html"
@@ -3580,6 +3580,8 @@
> $Tag->counter(
> {
> file =3D> VALUE,
+> sql =3D> VALUE,
+> start =3D> VALUE,
> }
> )
>
@@ -3632,14 +3634,13 @@
B<ASP-like Perl call:>
=20
!block example; lang=3D"Perl"
- $Tag->counter( { file =3D> VALUE_file
-}, $body );
+ $Tag->counter( { file =3D> VALUE_file, sql =3D> 'table:seq', start =3D=
> VALUE, } );
!endblock
=20
or similarly with positional parameters,
=20
!block example; lang=3D"Perl"
- $Tag->counter(file, $attribute_hash_reference, $body);
+ $Tag->counter(file, $attribute_hash_reference);
!endblock
=20
# END +++++++++++++++ counter End Summary Tables ++++++++++++++++++++
@@ -3666,7 +3667,7 @@
=20
H4: {{CMD[id=3D"counter_decrement"]decrement=3D1}}
=20
-Causes the counter to count down instead of up.
+Causes the counter to count down instead of up. This option is not applica=
ble to SQL counters.
=20
H4: {{CMD[id=3D"counter_start"]start=3D50}}
=20
@@ -3723,7 +3724,54 @@
!endblock
=20
Make sure you set up the sequence.txt file if you want Interchange to crea=
te
-the table for you.
+the table for you. Otherwise you can create the table yourself from a mysql
+client:
+
+ mysql> create table sequence_name(id int NOT NULL AUTO_INCREMENT PRIMARY=
KEY);
+
+Then access it with:
+
+!block example
+ [counter sql=3D"sequence_name:sequence_name"]
+!endblock
+
+Alternatively, you can create the table without Interchange definition
+as long as it is in the same database as an Interchange table:
+
+!block example
+ mysql> create table sequence_name(id int NOT NULL AUTO_INCREMENT PRIMARY=
KEY);
+!endblock
+
+Then access it by calling the Interchange-defined table name followed
+by the table that has the AUTO_INCREMENT key:
+
+!block example
+ [counter sql=3D"products:sequence_name"]
+!endblock
+
+To set up an Oracle counter, create a sequence:
+
+!block example
+ SQL> CREATE SEQUENCE foo START WITH 10000 INCREMENT BY 1
+ MAXVALUE 2147483647 MINVALUE 1 CACHE 2;
+!endblock
+
+Then access via a table already connected to Oracle, in below C<sometable>:
+
+!block example
+ [counter sql=3D"sometable:foo"]
+!endblock
+
+!block example
+ Database sequence_name sequence_name.txt dbi:mysql:test_foundation
+ Database sequence_name COLUMN_DEF "id=3Dint NOT NULL AUTO_INCREMENT PRIM=
ARY KEY"
+!endblock
+
+Make sure you set up the sequence.txt file if you want Interchange to crea=
te
+the table for you. Otherwise you can create the table yourself from a mysql
+client:
+
+ mysql> create table sequence_name(id int NOT NULL AUTO_INCREMENT PRIMARY=
KEY);
=20
Then access it with:
=20