[docs] docs - kwalsh modified ictags.sdf

docs@interchange.redhat.com docs@interchange.redhat.com
Fri Jul 26 19:24:01 2002


User:      kwalsh
Date:      2002-07-26 23:23:03 GMT
Modified:  .        ictags.sdf
Log:
	* Added documentation into the empty [PREFIX-param] section,
	  including notes about invalid column names such as "table.col".

	* Added some SDF jumps to the [PREFIX-pos] section.

Revision  Changes    Path
1.93      +56 -8     docs/ictags.sdf


rev 1.93, prev_rev 1.92
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: /var/cvs/docs/ictags.sdf,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- ictags.sdf	15 Jul 2002 13:52:15 -0000	1.92
+++ ictags.sdf	26 Jul 2002 23:23:03 -0000	1.93
@@ -1,10 +1,10 @@
 !init OPT_LOOK=3D"akopia"; OPT_STYLE=3D"manual"=20
-# $Id: ictags.sdf,v 1.92 2002/07/15 13:52:15 mheins Exp $
+# $Id: ictags.sdf,v 1.93 2002/07/26 23:23:03 kwalsh Exp $
=20
 !define DOC_NAME "Interchange Tags Reference"
 !define DOC_TYPE ""
 !define DOC_CODE "ictags"
-!define DOC_VERSION substr('$Revision: 1.92 $', 11, -2)
+!define DOC_VERSION substr('$Revision: 1.93 $', 11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://interchange.redhat.com/doc/ictags.html"
@@ -717,6 +717,50 @@
=20
 E:   E<lbracket>PREFIX-param name]
=20
+Returns the value of the column name associated with the looping tag row.
+Each looping list returns an array of C<return fields>, set in searches wi=
th
+C<mv_return_field> or C<rf>. The default is only to return the code of
+the search result, but by setting those parameters you can return
+whichever columns you wish.
+
+In a E<lbracket>query ...] ITL tag you can select multiple return fields w=
ith
+something like:
+
+>    [query prefix=3Dprefix sql=3D"select foo, bar from baz where foo=3D'b=
uz'"]
+>        [prefix-code]  [prefix-param foo]  [prefix-param bar]
+>    [/query]
+
+In this case, E<lbracket>{{C[jump=3D"#PREFIX-code"]prefix-code}}]
+and [prefix-param foo] are synonyms, as C<foo> is the first returned
+parameter and becomes the code for this row.
+Another synonym is E<lbracket>{{C[jump=3D"#PREFIX-pos"]prefix-pos}} 0].
+
+Note that the following code is invalid:
+
+>    [query prefix=3Dprefix sql=3D|
+>        SELECT  table1.foo,
+>                table2.bar
+>        FROM    table1, table2
+>        WHERE   table1.code =3D table2.code
+>        AND     table1.foo =3D 'buz'
+>    |]
+>        [prefix-param table1.foo] [prefix-param table2.bar]
+>    [/query]
+
+The problem with the above code is that DBI doesn't support column names
+such as C<table1.foo> in its resultsets.  The following query syntax is
+fully supported by DBI and therefore by Interchange:
+
+>    [query prefix=3Dprefix sql=3D|
+>        SELECT  table1.foo AS foo,
+>                table2.bar AS bar
+>        FROM    table1, table2
+>        WHERE   table1.code =3D table2.code
+>        AND     table1.foo =3D 'buz'
+>    |]
+>        [prefix-param foo] [prefix-param bar]
+>    [/query]
+
 H2: PREFIX-pos
=20
 E:   E<lbracket>PREFIX-pos N]
@@ -726,19 +770,23 @@
 the search result, but by setting those parameters you can return
 whichever columns you wish.
=20
-E<lbracket>PREFIX-pos N] outputs the data from the I<N>th field as returne=
d (starting with 0); E<lbracket>PREFIX-param] lets you access the data by f=
ield name instead of number.
+E<lbracket>PREFIX-pos N] outputs the data from the I<N>th column as return=
ed
+(starting with 0).
+E<lbracket>{{C[jump=3D"#PREFIX-param"]prefix-param}}] lets you access the =
data
+by column name instead of by number.
=20
 In a E<lbracket>query ...] ITL tag you can select multiple return fields w=
ith
 something like:
=20
->    [query prefix=3Dprefix sql=3D"select foo, bar from baz where foo=3Dbu=
z"]
+>    [query prefix=3Dprefix sql=3D"select foo, bar from baz where foo=3D'b=
uz'"]
 >        [prefix-code]  [prefix-param foo]  [prefix-param bar]
 >    [/query]
=20
-In this case, [prefix-code] and [prefix-param foo] are synonyms, for
-C<foo> is the first returned parameter and becomes the code for this row.
-Another synonym is [prefix-pos 0]; and [prefix-pos 1] is the same
-as [prefix-param bar].
+In this case, E<lbracket>{{C[jump=3D"#PREFIX-code"]prefix-code}}]
+and E<lbracket>{{C[jump=3D"#PREFIX-param"]prefix-param}} foo] are synonyms,
+as C<foo> is the first returned parameter and becomes the code for this ro=
w.
+Another synonym is [prefix-pos 0]; and [prefix-pos 1] is the same as
+E<lbracket>{{C[jump=3D"#PREFIX-param"]prefix-param}} bar].
=20
 H2: PREFIX-price
=20