Index: openacs-4/packages/acs-templating/tcl/query-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/query-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-templating/tcl/query-procs.tcl 15 Sep 2002 22:10:53 -0000 1.10 +++ openacs-4/packages/acs-templating/tcl/query-procs.tcl 24 Sep 2002 09:06:04 -0000 1.11 @@ -589,15 +589,53 @@ } + +ad_proc -public multirow { + {-ulevel 1} + {-local:boolean} + op + name + args +} { + multirow is really template::multirow or possibly + template::query::multirow depending on context. + the "template::" or "template::query::" + may be ommitted depending on what the namespace + is. .tcl pages are evaluated in the template:: + namespace. + + @see template::multirow + @see template::query::multirow +} - + ad_proc -public template::multirow { {-ulevel 1} {-local:boolean} - op + command name args } { - Perform get/set operations on a multirow datasource + Create/Manipulate a multirow datasource (for use with <multiple> tags) +
+
template::multirow create datasourcename column [column ...]
+
creates a multirow datasource of datasourcename
+
template::multirow extend datasourcename column [column ...]
+
extend adds a column to an existing multirow
+
template::multirow append datasourcename value [value ...]
+
appends the row to an existing multirow.
+
template::multirow size datasourcename
+
returns the rowcount
+
template::multirow get datasourcename rownum [column]
+
returns the row of of data (or the particular row/column if column is provided)
+
template::multirow get datasourcename rownum column value
+
set an element value
+
template::multirow foreach datasource code
+
evaluate code block for each row (like db_foreach)
+
template::multirow upvar datasource [new_name]
+
upvar the multirow, aliasing to new_name if provided
+
+ @param local If set, the multirow will be looked for in the scope the number of levels up given by ulevel (normally the caller's scope), @@ -608,21 +646,24 @@ Used in conjunction with the "local" parameter to specify how many levels up the multirow variable resides. - @param op + @param command Multirow datasource operation: create, extend, append, size, get, set, foreach @param name Name of the multirow datasource @param args optional args + + @see db_multirow + @see template::query::multirow } { if { $local_p } { set multirow_level_up $ulevel } else { set multirow_level_up \#[adp_level] } - switch -exact $op { + switch -exact $command { create { upvar $multirow_level_up $name:rowcount rowcount $name:columns columns @@ -768,7 +809,7 @@ } default { - error "Unknown op $op in template::multirow. + error "Unknown command $command in template::multirow. Must be create, extend, append, get, set, size, upvar, or foreach." } }