[docs] docs - jon modified ictags.sdf
docs@interchange.redhat.com
docs@interchange.redhat.com
Mon Nov 5 17:15:01 2001
User: jon
Date: 2001-11-05 22:14:22 GMT
Modified: . ictags.sdf
Log:
Document [data hash=1] option.
Revision Changes Path
1.65 +27 -2 docs/ictags.sdf
rev 1.65, prev_rev 1.64
Index: ictags.sdf
===================================================================
RCS file: /var/cvs/docs/ictags.sdf,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -u -r1.64 -r1.65
--- ictags.sdf 2001/11/02 17:47:33 1.64
+++ ictags.sdf 2001/11/05 22:14:22 1.65
@@ -1,10 +1,10 @@
!init OPT_LOOK="akopia"; OPT_STYLE="manual"
-# $Id: ictags.sdf,v 1.64 2001/11/02 17:47:33 edl Exp $
+# $Id: ictags.sdf,v 1.65 2001/11/05 22:14:22 jon Exp $
!define DOC_NAME "Interchange Tags Reference"
!define DOC_TYPE ""
!define DOC_CODE "ictags"
-!define DOC_VERSION substr('$Revision: 1.64 $', 11, -2)
+!define DOC_VERSION substr('$Revision: 1.65 $', 11, -2)
!define DOC_STATUS "Draft"
!define DOC_PROJECT "Interchange"
!define DOC_URL "http://interchange.redhat.com/doc/ictags.html"
@@ -3799,6 +3799,8 @@
>>|DEFAULT_VALUE
{{CMD[jump="#data_field"]field}}|<<
>>|DEFAULT_VALUE
+{{CMD[jump="#data_hash"]hash}}|<<
+>>|DEFAULT_VALUE
{{CMD[jump="#data_key"]key}}|<<
>>|DEFAULT_VALUE
{{CMD[jump="#data_field"]name}}|<<
@@ -3914,14 +3916,37 @@
# BEGIN ########### data Subsections ##############
H4: {{CMD[id="data_field"]field}}
+The name of the field whose value you want to fetch. Required unless returning the entire row in combination with the C<hash> option.
+
+
+H4: {{CMD[id="data_hash"]hash}}
+The hash option causes the data tag to return its results (the entire row, if you omit the field parameter) as a reference to a hash with column names as keys into the values of the row.
+
+An example:
+
+!block example; lang="Perl"
+ $row_hash = $Tag->data({
+ table => 'products',
+ key => 'os28004',
+ hash => 1,
+ });
+!endblock
+
+You could then access desired values this way:
+
+!block example; lang="Perl"
+ $out = 'Price: ' . $row_hash->{price};
+!endblock
H4: {{CMD[id="data_key"]key}}
+The key that identifies the row containing the value(s) you want to fetch. Required.
H4: {{CMD[id="data_table"]table}}
+The name of the Interchange-defined table you want to fetch data from. Required.
# END ++++++++++++ data Subsections +++++++++++++